问题
i am currently trying to solve my problem with the total in the footer. i tried searching in the internet with some examples, but they are using php, and i am using java. can you please show me what exactly the json looks like for this php script
$response->userdata['total'] = 1234;
$response->userdata['name'] = 'Totals:';
is this what it looks like?
{"total":0,**"userdata":[{"total":1234,"name":"Totals"}]**,"page":0,"aData":.....
thanks.
回答1:
userdata
must look like
"userdata":{"total":1234,"name":"Totals"}
instead of
"userdata":[{"total":1234,"name":"Totals"}]
to be able be displayed in footer if your columns have names "total" and "name".
回答2:
by default, the key data you need for the jqGrid footer in your json response are page, total and records, so in your json response make sure you have something that looks like this:
{"page":"1","total":2,"records":"13","rows":[{....}]}
来源:https://stackoverflow.com/questions/2802036/what-is-the-jqgrid-footer-json-format