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

2 posts, 0 answers
  1. ahsaan
    ahsaan avatar
    1 posts
    Member since:
    Oct 2020

    Posted 01 Oct 2020 Link to this post

    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!

  2. Tsvetomir
    Admin
    Tsvetomir avatar
    849 posts

    Posted 05 Oct 2020 Link to this post

    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/.

Back to Top