Get the page size and page number of the kendo grid in jQuery

I have an update button in the grid. Therefore, when I click the Refresh button, I can get the grid data, but

Can someone help me find the page number and page number of Kendo Grid in jQuery?

+4
source share
3 answers

You can get the page number by calling the page () function on the dataSource object in the kendo grid that you have, and the page size by calling the pageSize () function of this object.

Here's how you should do it based on the official documentation on the Kendo interface http://docs.kendoui.com/api/framework/datasource#methods-page :

$("#GRID_ID").data("kendoGrid").dataSource.pageSize(); $("#GRID_ID").data("kendoGrid").dataSource.page(); 
+10
source

You can get the current page using the code below:

 $("#GRID_ID").data("kendoGrid").dataSource.page(); 
0
source
 var pageSize = $("#MyGrid").data("kendoGrid").dataSource._pageSize; var pageNumber = $("#MyGrid").data("kendoGrid").dataSource._page; 

This is the correct answer that gives the size and page number.

-one
source

Source: https://habr.com/ru/post/1494194/


All Articles