jqgrid外部的自定义分页 [英] Custom paging outside jqgrid

查看:526
本文介绍了jqgrid外部的自定义分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在jqgrid之外具有自定义分页控件.如何实现下面的样式分页.滚动时它将加载下10条记录并继续(但是mvc控制器一次返回整个json记录).单击查看全部"将加载所有记录.分页控件应位于jqgrid之外. 非常感谢您的帮助. 请参考下图!

I want to have custom paging control outside the jqgrid.How can i achieve below style paging.On scroll it will load next 10 records and on(But the mvc controller is returning entire json record at once)..and also on clicking "view all" it will load all records .And the paging control should be outside the jqgrid. Help is much appreciated. Please refer the image below!

推荐答案

您只需使用page参数使用reloadGrid即可显示指定页面中的数据:

You can just reloadGrid with page parameter to display the data from specified page:

$("#grid").trigger("reloadGrid", { page: newPageNumber });

请参见简单演示 https://jsfiddle.net/OlegKi/a64yzdc5/1/,您可以在其中单击按钮"1","2"和"3"以切换按钮下方网格上的页面.

See the simple demo https://jsfiddle.net/OlegKi/a64yzdc5/1/, where you can click on the buttons "1", "2" and "3" to switch the page on the grid below the buttons.

这篇关于jqgrid外部的自定义分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆