Paging remembers previous value in ASP.NET MVC

2 posts, 0 answers
  1. Avinash
    Avinash  avatar
    52 posts
    Member since:
    Jan 2016

    Posted 09 Aug Link to this post

    I have a form with input text boxes, search button and grid to display the result. Once user clicks on Search button, the result get displayed in the grid. I have 10,20, 50, 100, All set as paging option in the grid. At first when the result gets displayed in the grid the paging value is 10. The issue is once the user selects different paging value e.g. 50 and perform search again, the result that get displayed in the grid is with paging value of 50. 

    Is there anyway to reset paging value back to 10 again whenever new search is performed?

    Thanks.

    Avinash

  2. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 11 Aug Link to this post

    Hello Avinash,

    To achieve this requirement, you can get a reference to the dataSource of the grid Kendo object and execute the pageSize method:
    http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-pageSize

    Here are some more examples:
    http://www.telerik.com/forums/is-there-a-way-to-change-the-pagesize-dinamically
    http://stackoverflow.com/questions/11330474/how-to-change-page-size-dynamically-in-kendo-ui-grid

    I hope this will prove helpful.

    Regards,
    Eyup
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top