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

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

Yes it does work with Ajax binding. Can you try it with server binding?
Thanks.
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

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