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

Page size 'all' option not retained

7 Answers 229 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nikita
Top achievements
Rank 1
Iron
Nikita asked on 07 Nov 2016, 06:50 PM

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

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Nov 2016, 05:27 PM
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.
0
Nikita
Top achievements
Rank 1
Iron
answered on 09 Nov 2016, 07:01 PM

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

0
Pavlina
Telerik team
answered on 10 Nov 2016, 09:41 AM
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.
0
Nikita
Top achievements
Rank 1
Iron
answered on 14 Nov 2016, 06:20 PM

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

Thanks.

0
Pavlina
Telerik team
answered on 16 Nov 2016, 01:00 PM
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.
0
Nikita
Top achievements
Rank 1
Iron
answered on 16 Nov 2016, 05:38 PM
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.
0
Pavlina
Telerik team
answered on 17 Nov 2016, 08:26 AM
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.
Tags
Grid
Asked by
Nikita
Top achievements
Rank 1
Iron
Answers by
Pavlina
Telerik team
Nikita
Top achievements
Rank 1
Iron
Share this question
or