OrderBy in LoadData still not working with 5.9.5 #1583

Open
opened 2026-01-29 17:55:41 +00:00 by claunia · 0 comments
Owner

Originally created by @osre77 on GitHub (Jan 28, 2025).

Describe the bug
I have a dataGrid with virtualization turned on and using LoadData.
When ever a sort query starts with np() or String(), IQueryable.OrderBy(string) throws an exceptin that the model type does not have the property np or String.

This started with 5.9.5 since you updated to the Linq.Dynmaic V1.6.0. 5.0.0 with the 1.6.0 preview did still work.

To Reproduce
Steps to reproduce the behavior:

  1. Get the latest comit from https://github.com/CodeYesterday/Lovi
  2. Start CodeYesterday.Lovi application
  3. Click "Open session"
  4. Select the directory LogData\SmallSession included in the repository
  5. An error notification is shown that the property np does not exist in LogItemModel.
  6. The generated OrderBy expression form the DataGrid is np(LogEvent.Timestamp) asc
  7. The same happens when a column of type string is used for sorting with the String() cast.

Expected behavior
Data should be ordered and displayed, no exception is thrown.

Desktop (please complete the following information):

  • OS: Windows 11
  • Blazor Maui Hybrid

Additional context
The np istn't even needed here, since the default sort column is never null, not sure why np is used there.

The np seems not to be a problem for filtering, only for sorting.
The DataGrid is here: 379f77071b/source/CodeYesterday.Lovi/Components/Pages/LogView.razor (L19)
The sorting is applied here: 379f77071b/source/CodeYesterday.Lovi/Session/InMemorySessionDataStorage.cs (L330)

Originally created by @osre77 on GitHub (Jan 28, 2025). **Describe the bug** I have a dataGrid with virtualization turned on and using LoadData. When ever a sort query starts with `np()` or `String()`, `IQueryable.OrderBy(string)` throws an exceptin that the model type does not have the property `np` or `String`. This started with 5.9.5 since you updated to the Linq.Dynmaic V1.6.0. 5.0.0 with the 1.6.0 preview did still work. **To Reproduce** Steps to reproduce the behavior: 1. Get the latest comit from https://github.com/CodeYesterday/Lovi 2. Start CodeYesterday.Lovi application 3. Click "Open session" 4. Select the directory `LogData\SmallSession` included in the repository 5. An error notification is shown that the property `np` does not exist in LogItemModel. 6. The generated OrderBy expression form the DataGrid is `np(LogEvent.Timestamp) asc` 7. The same happens when a column of type string is used for sorting with the `String()` cast. **Expected behavior** Data should be ordered and displayed, no exception is thrown. **Desktop (please complete the following information):** - OS: Windows 11 - Blazor Maui Hybrid **Additional context** The `np` istn't even needed here, since the default sort column is never null, not sure why np is used there. The np seems not to be a problem for filtering, only for sorting. The DataGrid is here: https://github.com/CodeYesterday/Lovi/blob/379f77071b3009ce05d11d6fe2aa72071314a6f7/source/CodeYesterday.Lovi/Components/Pages/LogView.razor#L19 The sorting is applied here: https://github.com/CodeYesterday/Lovi/blob/379f77071b3009ce05d11d6fe2aa72071314a6f7/source/CodeYesterday.Lovi/Session/InMemorySessionDataStorage.cs#L330
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1583