How to use Angular UI-Grid with Server Side Paging

痴心易碎 提交于 2019-12-02 19:36:17
guru

There is a server-side pagination option available in the API.

http://ui-grid.info/docs/#!/api/ui.grid.pagination.api:GridOptions -> useExternalPagination

Here is an example of server-side pagination and sorting:

http://plnkr.co/edit/UttxPkXG8fYQDX85fnyZ?p=preview

In above example, refer to the code block given below which does the server-side pagination:

gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
    paginationOptions.pageNumber = newPage;
    paginationOptions.pageSize = pageSize;
    getPage();
});

It is easy to build your own grid by using uib-pagination and ng-repeat. There is a completed example in the following link. Hope this would help.

Angular WebAPI Pagination

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