简体   繁体   English

jqgrid外部的自定义分页

[英]Custom paging outside 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. 我想在jqgrid外部有自定义的分页控件。如何实现以下样式的分页。在滚动时它将加载接下来的10条记录并继续(但是mvc控制器一次返回整个json记录)。 all”将加载所有记录。分页控件应位于jqgrid外部。 Help is much appreciated. 非常感谢您的帮助。 Please refer the image below! 请参考下图! 在此处输入图片说明

You can just reloadGrid with page parameter to display the data from specified page: 您可以使用page参数重新reloadGrid以显示指定页面中的数据:

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

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. 请参见简单的演示https://jsfiddle.net/OlegKi/a64yzdc5/1/ ,您可以在其中单击按钮“ 1”,“ 2”和“ 3”以切换按钮下方网格上的页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM