我正在使用jQuery Ajax调用Webservice来在jqgrid中显示数据(JSON格式)。这就是我的json格式,
{
"records": "4",
"response": [
{
"id": 141505,
"docno": "4032407",
"Checked": "No",
"vendorid": "40238"
},
{
"id": 141506,
"docno": "4032405",
"Checked": "No",
"vendorid": "40286"
},
{
"id": 141507,
"docno": "4032409",
"Checked": "No",
"vendorid": "40282"
},
{
"id": 141508,
"docno": "4032419",
"Checked": "No",
"vendorid": "40282"
}
]
}
这是我的jsonreader,
jsonReader: {
repeatitems: false,
id: "id",
root: function (obj) { return obj; },
page: function (obj) { return obj.length > 0 ? 1 : 0; },
total: function () { return 1; },
records: function (obj) { return obj.length; },
subgrid: {
repeatitems: false,
id: "id",
root: function (obj) { return obj; }
}
},
数据正确绑定在jqgrid中,但不是总记录(显示在json中)...如何绑定工具栏底部的JQGrid中的总记录。 即(视图1 - 4 of 4)