Forum
17:11
21/07/2010
I've been banging my head for a little while watching a weird jqgrid behavior and trying to get around it. I'm using v.3.7.2. (though this issue also occurred with v.3.6.5). Here's the problem. I'm using a grid with these grid settings (i skipped some irrelevant params):
-------
var gridOption = {
rowNum: 10,
pager: '#pagerId',
rowList:[10,20,30],
....
datatype: 'local',
};
To bind my data to the grid I execute these commands:
this.jqGrid.setGridParam({ data: rows });
this.jqGrid.trigger('reloadGrid');
The rows object has a bunch of data for the grid retrieved from the server. Each row has an object with Id property holding a unique record Id in my db. After binding the data and before invoking 'reloadGrid' the jqgrid.getDataIDs() method returns an array with IDs exactly matching those stored in the rows object. Then after reloading the grid this method now returns me an array of values starting from 1, 2... So it looks like the initial IDs are gone and the new IDs are generated after reloading.
What the heck am I doing wrong there?:)
20:08
Moderators
30/10/2007
Hello,
Thanks. This is a known issue and we think how to fix it without big problems.
In the meantime you should apply a refreshIndex function something like this:
var mygrid = $("gridid")[0];
mygrid.refreshIndex();
after triggering the grid.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
37 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