[PR #2233] feature: DataGrid Columns allow Sort and Filter when bound to Array<o… #3149

Open
opened 2026-01-29 18:22:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/2233

State: closed
Merged: Yes


The objective is to use native display, filter and sort in a DataGrid
This does not work atm as the DataRow.ItemArray[] returns object which cannot be filtered, but if DataColumn Type property is set then the propertyValueGetter is not set. The changes:

public static Type GetPropertyType(Type type, string property)// returns type of underlying array type when type==array[]
GetNestedPropertyExpression(Expression expression, string property, Type type = null)// adds a Converter when property is array[] and T != type
protected override void OnInitialized() // changes the logic here so that both Type can be set and propertyValueGetter is set under these circumstances

The last is the change most needing of review. I have altered existing logic without fully understanding what it is handling. Maybe the logic should be added to handle the specific case where the underlying data object type != Type

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/2233 **State:** closed **Merged:** Yes --- The objective is to use native display, filter and sort in a DataGrid<DataRow> This does not work atm as the DataRow.ItemArray[] returns object which cannot be filtered, but if DataColumn Type property is set then the propertyValueGetter is not set. The changes: public static Type GetPropertyType(Type type, string property)// returns type of underlying array type when type==array<type>[] GetNestedPropertyExpression(Expression expression, string property, Type type = null)// adds a Converter when property is array<T>[] and T != type protected override void OnInitialized() // changes the logic here so that both Type can be set and propertyValueGetter is set under these circumstances The last is the change most needing of review. I have altered existing logic without fully understanding what it is handling. Maybe the logic should be added to handle the specific case where the underlying data object type != Type
claunia added the pull-request label 2026-01-29 18:22:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3149