Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
row IDs are reset after triggering 'reloadGrid'
Tags: jqgrid
21/07/2010
17:11
Avatar
aprokhorov
New Member
Members
Forum Posts: 1
Member Since:
21/07/2010
sp_UserOfflineSmall Offline

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?:)

29/07/2010
20:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information