This is a migrated thread and some comments may be shown as answers.

how to get the selected page size in keno grid databound event

1 Answer 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ahsaan
Top achievements
Rank 1
ahsaan asked on 01 Oct 2020, 12:36 PM

my requirement is to save the page size selected by user in kendo grid, how can we get the  selected page size drop down value

the below property of kendo grid get the default page not the actual page size selected by the user.

$("#grid").data("kendoGrid").dataSource.pageSize

thanks for your help!

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 05 Oct 2020, 06:29 AM

Hi Ahsaan,

The value of the dropdown list within the pager of the grid can be obtained as follows:

$(".k-grid-pager").find("select[data-role='dropdownlist']").getKendoDropDownList().value()

However, if you make use of the pageSize() method, instead of the property, you should be able to retrieve the latest page size that is applied to the grid:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/pagesize

 

Regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
ahsaan
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or