Duplicated
Last Updated: 27 Nov 2023 08:38 by ADMIN
Mike
Created on: 07 Apr 2023 18:10
Category: Pager
Type: Bug Report
3
Page Size dropdown is blank when the total number of rows equals the selected page size and no "All" option

If you use the pager whether in the grid, or on its own and the total number of rows in the underlying data source exactly matches the selected page size, the drop down will be displayed as blank.  This will only occur when there is no null "All" option in the list of page sizes.  By the looks of it, I would guess that there is code to select "All" whenever the total matches the selected page size option, but it selects nothing when the "All" option isn't in the list.  The functionality should select the page size that was selected by the user, not try to reset itself to All if the number of rows equals the page size.  The following repl shows the bug:

https://blazorrepl.telerik.com/mxOIEBPW09nKgO9A35

When you run the repl, change the page size to 5, and then back to 10.  You will see that the dropdown selects a blank item.  It should stay with 10.

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
5 comments
ADMIN
Tsvetomir
Posted on: 27 Nov 2023 08:38

Hi, Patrik,

Indeed, this item is marked as a duplicate and will receive no further action. Please keep track of the original bug report which has not been yet resolved (as of 5.0). 

Regards,
Tsvetomir
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Patrik Madliak
Posted on: 23 Nov 2023 14:52

In version 5.0 is still reproducible.

https://blazorrepl.telerik.com/mxlFwHbI43ZFgTtt05

ADMIN
Tsvetomir
Posted on: 17 Apr 2023 13:25

Hi Mike,

Indeed, this is a bug on our side and I have referenced the original item regarding the same:

https://feedback.telerik.com/blazor/1583192-a-blank-value-appears-in-the-dropdown-when-pagesize-is-not-within-the-predefined-pagesizes-or-equals-the-totalcount

Kind regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Mike
Posted on: 14 Apr 2023 13:38

Hi Tsvetomir,

I am using the paging feature, I just don't want to give users the option to select all records for performance reasons.  There are some grids in my application where if the user selected all, it would try to display 10,000+ records on one page, and I don't want that.  I'd like to cap that to a finite number.  So I don't want the null "All" option in my dropdown.  However, once I do that if by some chance the the number of records returned equals the number selected for the page size, then it blanks out the dropdown.  If the all option isn't in the list, then it should stick with the page size that was selected. 

I would think in general you should follow this logic anyway.  I can see other cases where a user saves the selected page size to local storage to set it back later, and your pager changes the selected page size automatically to all, it's not saving what the user truly selected for paging.

ADMIN
Tsvetomir
Posted on: 14 Apr 2023 13:26

Hi Mike,

Indeed, with the current setup, the total count of items is 10. And the grid tries to set the page size to 10 (which is also the equivalent of All). Hence, when you add the null option to the page sizes, you'd see this behavior:

https://blazorrepl.telerik.com/mnkeFIbH24Rq1Zpa10

Is there a specific reason why you would like to take only 10 items from the whole data source? Is there a reason not to use the paging functionality?

Kind regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.