我正在使用这个 jqgrid
$("#griglia-navgrid").jqGrid( {
url: 'search.do?report='+r,
datatype: "json",
colNames:[ ... ],
colModel:[ ... ],
rowNum:50,
rowList:[20,50,100],
pager: '#pager',
autowidth:true,
height:'auto',
viewrecords: true,
sortname: "MATNR",
sortorder: "asc",
footerrow : true,
userDataOnFooter: true,
jsonReader: {
root:"INVDATA",
page: "CURRPAGE",
total: "TOTALPAGES",
records: "TOTALRECORDS",
repeatitems: false,
id: "0",
userdata: "USERDATA",
}
}); //jqGrid
在服务器端,我计算总数并像这样使用“userdata”:
"userdata":{"total":1234,"name":"Totals"}
它的作品。现在我需要显示总计的 2 页脚行。我尝试这样的事情:
"userdata":[{"total":1234,"name":"Totals"},{"total":5678,"name":"Totals"}]
但不起作用。是否可以使用“userdata”添加两个页脚行?我怎样才能做到这一点?