EDIT: bad at english and missing ‘;’ after the ‘sind = sind.rowIndex + addin’ statement
I believe I have found a bug in the addRowData method.  The bug occurs when using the method with pos = “after” and a subgrid exists below the row you are attempting to insert after.  First off, when inserting ‘row’ the .join(”) method is not used.  Second off, the ‘sind’ is incremented incorrectly.  In this case it should be incremented by two, but it is only incremented by one.  Here is a jsFiddle link to my code:
http://jsfiddle.net/mzrLeqqe/1/
Used jsFiddle since I didn’t really try to make the code formatted in this post. Â Below is a hard copy.
case ‘after’:
sind = $(t).jqGrid(‘getGridRowById’, src);
if (sind) {
var addin = 1;
if ($(t.rows[sind.rowIndex + 1]).hasClass(“ui-subgrid”)) { $(t.rows[sind.rowIndex + 1]).after(row.join(”)); addin++; }
else { $(sind).after(row.join(”)); }
sind = sind.rowIndex + addin;
}
break;
Hope this helps.
I believe the version I was using version 4.6 when I discovered this, but it appeared version 4.7 did not have this fixed.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top