Page size 'all' option not retained

8 posts, 0 answers
  1. Nikita
    Nikita avatar
    9 posts
    Member since:
    Apr 2013

    Posted 07 Nov Link to this post

    I have a Telerik MVC Grid with server binding. I configure it to have an 'all' page size option. The page size selection works and when I pick 'all' it does show all the records but the selected page size value in the dropdown resets to default. Is this a bug or I'm doing something wrong? Is there a workaround for this? I've attached an example project (excluded Kendo components from the archive). 

    Thank you.

    Nik

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 09 Nov Link to this post

    Hello,

    Could you try modifying the code as shown below and let me know if page size all option is retained?

    .Pageable(p => p
    .Refresh(true)
    .PageSizes(new[] { "2", "3", "All" })

    Also remove PageSize(2) from  DataSource configuration.

    Regards,
    Pavlina
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Nikita
    Nikita avatar
    9 posts
    Member since:
    Apr 2013

    Posted 09 Nov in reply to Pavlina Link to this post

    Thank you very much for the response. Unfortunately that did not help. Now it shows all rows by default but page size 2 is selected in the drop down. When I change it to 3 it works correctly, but when going back to all it still shows all records and a page size of 2.

    Nik

  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 10 Nov Link to this post

    Hello,

    Attached you can find my test page where PageSize All is working properly as shown in the video linked below:
    http://www.screencast.com/t/9Ix2Y8mVhyde

    Check it out and see what is the difference on your end.

    Regards,
    Pavlina
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  6. Nikita
    Nikita avatar
    9 posts
    Member since:
    Apr 2013

    Posted 14 Nov in reply to Pavlina Link to this post

    Yes it does work with Ajax binding. Can you try it with server binding?

    Thanks.

  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 16 Nov Link to this post

    Hello,

    Indeed PageSizes all option is not retained with server binding. I have forwarded the issue to our developers and they will fix it as soon as possible. Please excuse us for the inconvenience caused by this issue. Your Telerik points are updated.
     
    Regards,
    Pavlina
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Nikita
    Nikita avatar
    9 posts
    Member since:
    Apr 2013

    Posted 16 Nov in reply to Pavlina Link to this post

    Thank you, Pavlina. Is there a way to specify a large number (500 in my case would work) and have it show up as ALL option in the page size drop down? Maybe that will work as a workaround.
  9. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 17 Nov Link to this post

    Hi,

    Yes, you can just add the largest number as a page size and it should work:
    .Pageable(p => p
           .Refresh(true)
           .PageSizes(new[] { "2", "3", "500" }))

    Regards,
    Pavlina
    Telerik by Progress
    Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready