Forum
03:53
09/12/2014
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.
Most Users Ever Online: 715
Currently Online:
46 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66