jqGrid分页问题
如果您有 17 条记录并且一次显示 15 条,那么当您在第 2 页上时,您会看到 17 条记录中的第 16-17 条记录 - 这是有道理的。
现在,当您在第二页上并点击导航上的重新加载按钮(设置 datatype='json')时,当网格重新加载时,导航显示网格正在显示 17 中的 16-30。这似乎是错误 - 有解决方法吗?
网格仍然有 17 行 - 但它试图在第二页上显示完整的 15 行(rowNum)设置,而它应该只显示两行(16-17)。并且导航分页文本不正确(指的是 30 行,而只有 17 行)。
If you have 17 records and are displaying 15 at a time then when you're on page 2 you see records 16-17 of 17 - makes sense.
Now when you're on this second page and you hit the reload button on the nav (set datatype='json') when the grid reloads the nav is showing that the grid is displaying 16-30 of 17. This seems to be a bug - is there a workaround?
The grid still has 17 rows - but it's trying to show a full 15 rows (the rowNum) setting on the second page when it should only be showing two rows (16-17). And the nav pagination text is incorrect (referring to 30 rows when there is only 17).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的。这是一个老问题了。我以前一直用过,
但还有另一种方法。触发器“reloadGrid”支持附加选项:“当前”和“页面”。
将一步将
page
重置为 1。表单中的使用允许保留当前选择。您当然可以将这两个选项结合起来。
You are right. It is an old problem. I used always before
but there is another way. The trigger 'reloadGrid' support additional options: 'current' and 'page'.
will reset
page
to 1 in one step. The usage in the formallows to preserver current selection. You can of cause combine both options.