When I have no rows returned, our jqGrid pager says Page 1 of NaN
.
The JSON returned is:
{"page":"1","records":"0","total":"1"}
Why is NaN
listed?
Update: We only seem to have this issue when we use loadonce:true
.
Here's the source code:
$("#list").jqGrid({
url:'NoData.json',
datatype: 'json',
mtype: 'GET',
colNames:['Product', 'Type'],
colModel :[
{name:'product', index:'product', width:80},
{name:'type', index:'type', width:55, align:'right'},
],
pager: '#pager',
rowNum:20,
viewrecords: true ,
caption: 'Positions',
height: '460',
loadonce:true,
hidegrid: false
});
Update 2: What seems to work is the JSON below - is this right?
{"page":0,"records":0,"total":0,"rows":[]}