Forum
22:04
14/08/2013
Can someone please tell what stupid mistake I am doing when I try to add a row before the 4th row. It is constantly adding it to the end of the grid.
Yet the editRow call goes to the 4th row as it should after the row is added.
var emptyItem=[{"rowid":"tableIdField", "act": "", "action":"1", "nfirsCode":"2", "description":"3", "agencyId":"4", "tableName":"5", "tableIdName":"6", "tableIdField":"7" ,"timestamp":"8"}];
var thisRowId = $.jgrid.randId();
$("#" + childGrid + "").addRowData(thisRowId, emptyItem, "before", "4");
$("#" + childGrid + "").jqGrid('editRow',4,true);
And I have looked at the documentation until I was glossy eyed and still can't figure it out.
Oh and by the way the reason behind this portion of the code.... $("#" + childGrid + ""). is that I dynamically create the grids based on an action from another grid on the same page.
Thanks in advance,
Steve
Most Users Ever Online: 715
Currently Online:
40 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