DataGrid dynamic data sort error

DataGrid sorting no longer works with dynamic data, it errors on the demo too whenever you click a column to sort it.

From my debugging it is related to the QueryableExtension method GetNestedPropertyExpression, and was broken in this commit from 3/5/25. Since an IDictionary is an interface it falls into the new code, rather than it's existing case. I found this bug while looking into another bug with dynamic data that I ran into related to the Dynaimc LINQ library upgrade.

In the second bug, any columns with a space in their title/property string do not sort, and sometimes errors (on the demo just add a space to make it like "Employee ID"). This is related to the QueryableExtension method OrderBy, and how it splits the property string. When calling the method GetNestedPropertyExpression, there is a string split on the space character which causes the issue (since there is a space in the property name). Better splitting logic to only split on the space before " asc" or " desc" would fix this issue.

Both will be fixed immediately and we will publish update.

Thanks for the quick response @enchev! The issue is fixed, however your commit fixing the issue with spaces in the title has accidentally caused a big issue. Now sorting is broken on all non-dynamic DataGrid columns, since the new variable "name" is not trimmed.

I would also suggest using regex or some other method to get rid of the " asc" / " desc" at the end of the string, since there will be issues with columns that include those substrings in them. For instance, if you have a column with a property of "Masculine" or "Full description", it errors in the dynamic Datagrid demo at least.

I can confirm DataGrid sorting is broken with latest version.

Thanks! We will improve this in our next update.