我使用jqGrid v4.4.5。当网格为空时,显示'Page 1 of 0'。我读了这个答案 ,但我的问题没有解决。我的httphandler发送这个json结果
"{\"page\":0,\"records\":0,\"rows\":[],\"total\":0,\"userdata\":null}"
gridParaf = $("#gridParaf").jqGrid(
{
url:"GetLetterInformationHandler.ashx?CurrentUser=" + 1457,
datatype: 'json',
width: $("#contentParaf").width() + 410,
height: $("#contentParaf").height() - 20,
direction: "rtl",
colNames: ['IAnsDateTime', 'IAnsState'],
colModel: [
{ name: 'IAnsDateTime', width: 50, sortable: false, hidden: false, template: CenterTemplate },
{ name: 'IAnsState', width: 20, sortable: false, hidden: false, template: CenterTemplate },
],
rowNum: 20,
loadonce: true,
rowList: [5, 10, 20],
recordpos: "left",
ignoreCase: true,
toppager: true,
viewrecords: true,
sortorder: "desc",
scrollOffset: 1,
editurl: 'clientArray',
shrinkToFit: true,
jsonReader:
{
repeatitems: false,
},
gridview: true,
});