Reputation: 697
I have a update button in grid. So when I click on update button I am able to get the data of the grid but,
Can any one help me to find the PageSize and Page number of a Kendo Grid in the Jquery ?
Upvotes: 7
Views: 18422
Reputation: 427
You can get current page using below code :
$("#GRID_ID").data("kendoGrid").dataSource.page();
Upvotes: 0
Reputation: 1151
You can get page number by calling function page() on the dataSource object in kendo grid you have, and page size by calling function pageSize() of that object.
This is how you should do it, based on official Kendo UI documentation http://docs.kendoui.com/api/framework/datasource#methods-page :
$("#GRID_ID").data("kendoGrid").dataSource.pageSize();
$("#GRID_ID").data("kendoGrid").dataSource.page();
Upvotes: 16
Reputation: 697
var pageSize = $("#MyGrid").data("kendoGrid").dataSource._pageSize;
var pageNumber = $("#MyGrid").data("kendoGrid").dataSource._page;
This is the correct answer that give the page size and number.
Upvotes: -1