what is the jqgrid footer json format

只谈情不闲聊 提交于 2019-12-11 07:53:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!