Nhu
asked on 20 Nov 2022, 11:17 AM
| edited on 20 Nov 2022, 11:18 AM
I'm trying to add an "All" option in pagesize menu as the first image below. However, when I select "All", the selected menu item will become the total number as the second image. Can anyone help me with a solution for this? Thanks in advance!
1 Answer, 1 is accepted
0
Ivaylo
Telerik team
answered on 22 Nov 2022, 02:33 PM
Hi, Nhu,
Thank you for contacting us.
With the current implementation of the Grid, the DropDownList used internally for the page sizes accepts only numbers , hence the total value is added to it once the "All" options is chosen. Therefore, as the selected value for 'All' field is not part from initial list, the total value applied dynamically to to the page size is imported in the dropdown data. Currently, the only possible option to customize the Pageр behavior further would be to implement a custom pager, defining your own components in it:
For example, you can see how to define a custom pageSize DropDownList below the default pager, and update the Grid pages when the dropdown selection is changed in the sample below (or customize it in a way to fit your needs better):
Last but not least, we also have logged an official feature request for this improvement in our feedback portal, I added a vote on your behalf in order to increase its priority. You can track its progress here:
I hope the provided information will be helpful for you.
Regards,
Ivaylo
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/.