jqgrid页脚json格式是什么

发布于 2024-08-31 13:21:23 字数 333 浏览 11 评论 0原文

我目前正在尝试解决页脚总数的问题。我尝试在互联网上搜索一些示例,但他们使用的是 php,而我使用的是 java。你能告诉我这个 php 脚本的 json 到底是什么

$response->userdata['total'] = 1234;
$response->userdata['name'] = 'Totals:'; 

样子吗?

{"total":0,**"userdata":[{"total":1234,"name":"Totals"}]**,"page":0,"aData":.....

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

多情出卖 2024-09-07 13:21:23

如果您的列的名称为“total”和“name”, userdata 必须看起来像

"userdata":{"total":1234,"name":"Totals"}

而不是

"userdata":[{"total":1234,"name":"Totals"}]

能够显示在页脚中。

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".

葬心 2024-09-07 13:21:23

默认情况下,json 响应中 jqGrid 页脚所需的关键数据是页面、总计和记录,因此在 json 响应中确保您有如下所示的内容:

{"page":"1","total":2,"records":"13","rows":[{....}]}

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":[{....}]}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文