Reputation: 2054
I am facing this issue where my server returns 3 records, but the grid alwas shows only the first record, irrespective of the number of the records. Here is my grid configuration.
$('#grid').jqGrid({
autowidth: true,
autoheight: true,
shrinkToFit: true,
datatype: 'local',
viewrecords: true,
hidegrid: false,
colModel: [...],
rowNum: -1,
recreateForm: true
});
$('#grid').setGridParam({
datatype: 'local',
data: [ {...}, {...} ]
}).trigger('reloadGrid');
What am I doing wrong?
Thanks Vivek Ragunathan
Upvotes: 0
Views: 502
Reputation: 221997
The option rowNum: -1
have wrong value. If you need show all records without paging you should use some large positive value like rowNum: 10000
. The second problem is setting of data
parameter with respect of setGridParam
. You should first remove old data and then set new one.
Upvotes: 2