Forum



20:33

06/06/2011

I have a "local" jqgrid setup and it's showing my data but the pager values aren't completely accurate. I suppose it's because I'm not sure how to update the pager values after I set the 'data' property on the grid. Here's what I am doing.
var grid = $('#table').jqGrid({
datatype: 'local',
altRows: true,
colModel: [
{name: '0', label: "Name"},
{name: '1', label: "Color"},
],
pager: "#pager",
rowNum: 15,
sortname: '0',
viewrecords: true,
gridview: true,
height: '100%',
autowidth: '100%'
});
grid.setGridParam({data: results.rows}).trigger('reloadGrid');
My "results" is an object like this:
When I first get data, the "results" object has 15 rows. How can I tell the pager that there are 70 pages and a total 1,045 rows available? Right now it shows "page 1 of 1" and "view 1 - 15 of 15".
Thanks!
14:30

06/06/2011

Got it! Had to customize the localReader, see my answer on stackoverflow: http://stackoverflow.com/quest.....62#6256062
Most Users Ever Online: 715
Currently Online:
169 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