DropDownDataGrid does not show value when using LoadData #359

Closed
opened 2026-01-29 17:36:01 +00:00 by claunia · 4 comments
Owner

Originally created by @OndrejUzovic on GitHub (Apr 5, 2022).

When DropDownDataGrid is used with LoadData then it displays empty value line if the value is not present on the current 'drop' page.

To reproduce the issue use the 'Custom Filtering' from the demo page (https://blazor.radzen.com/dropdown-datagrid):

  1. In custom filtering drop down select the very first item.

  2. Open the drop down again - the value is correctly displayed.
    image

  3. Go to the second page in the drop list - the value will disappear.
    image

Then if you go back to the first page it appears again.

This behavior is very unintuitive for users, especially when you need to initialize the drop box with a value which is not listed on the first drop page.
If it is an unintended behavior, could you please provide a fix? Or in case I miss something, could you please advice me how to resolve it?

Originally created by @OndrejUzovic on GitHub (Apr 5, 2022). When DropDownDataGrid is used with LoadData then it displays empty value line if the value is not present on the current 'drop' page. To reproduce the issue use the 'Custom Filtering' from the demo page (https://blazor.radzen.com/dropdown-datagrid): 1. In custom filtering drop down select the very first item. 2. Open the drop down again - the value is correctly displayed. ![image](https://user-images.githubusercontent.com/55758368/161841753-a170e429-5d14-48eb-8037-d36619c4258f.png) 3. Go to the second page in the drop list - **the value will disappear**. ![image](https://user-images.githubusercontent.com/55758368/161842099-64c6b3a8-f4f4-4e2c-b315-c3a58ca5d258.png) Then if you go back to the first page it appears again. This behavior is very unintuitive for users, especially when you need to initialize the drop box with a value which is not listed on the first drop page. If it is an unintended behavior, could you please provide a fix? Or in case I miss something, could you please advice me how to resolve it?
Author
Owner

@enchev commented on GitHub (Apr 6, 2022):

This behavior is by design and cannot be fixed. When binding with LoadData you assign only single page of items to Data property and that’s why the component cannot find item from other pages. When using IQueryable the DropDown component will query selected item since it’s possible to access everything from the query.

@enchev commented on GitHub (Apr 6, 2022): This behavior is by design and cannot be fixed. When binding with LoadData you assign only single page of items to Data property and that’s why the component cannot find item from other pages. When using IQueryable the DropDown component will query selected item since it’s possible to access everything from the query.
Author
Owner

@OndrejUzovic commented on GitHub (May 17, 2022):

I am returning back to this topic because it is very problematic to overcome it.

The problem is I need to use LoadData because I need to provide a custom filtering which is working correctly with the diacritics.
(I am not reading data directly from DB, so I cannot relay on the DB collation settings.)

But then showing nothing in the dropdown value section is very confusing for users.

So I would like to ask if you have maybe any recommendation for me.

Also, maybe a simple solution could be to provide a callback API allowing a custom evaluation if the value exist and can be displayed.

Or maybe the clean solution would be if the ValueTemplate would be always displayed letting the programmer decide the content. (The current behavior is that ValueTemplate is not used if the value is not found inside the query. :-()

@OndrejUzovic commented on GitHub (May 17, 2022): I am returning back to this topic because it is very problematic to overcome it. The problem is I need to use LoadData because I need to provide a custom filtering which is working correctly with the diacritics. (I am not reading data directly from DB, so I cannot relay on the DB collation settings.) But then showing nothing in the dropdown value section is very confusing for users. So I would like to ask if you have maybe any recommendation for me. Also, maybe a simple solution could be to provide a callback API allowing a custom evaluation if the value exist and can be displayed. Or maybe the clean solution would be if the ValueTemplate would be always displayed letting the programmer decide the content. (The current behavior is that ValueTemplate is not used if the value is not found inside the query. :-()
Author
Owner

@MPapst commented on GitHub (May 18, 2022):

When using LoadData, ist is necessary to set the Count Property to the count of all available items selected by your Filter criteria. This allows the component correctly to calculate for paging and displaying the items.

@MPapst commented on GitHub (May 18, 2022): When using LoadData, ist is necessary to set the Count Property to the count of all available items selected by your Filter criteria. This allows the component correctly to calculate for paging and displaying the items.
Author
Owner

@OndrejUzovic commented on GitHub (May 19, 2022):

Actually, it seems upgrading to 3.18.10 will solve the problem.

@OndrejUzovic commented on GitHub (May 19, 2022): Actually, it seems upgrading to 3.18.10 will solve the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#359