DataGrid advanced filter

Hi ,
Looking for a solution to have datagrid column filter on Enum values.
e.g.
Data type of a column in the Datagrid is of type Integer and is translated to text using the template method of the column ( $EnumValues[data.integervalue]} ).
This works as expected and shows the corresponding Text in the DataGridRow / Column.

however you still have to filter on the integer values .

How can we use the same add a headertemplate to the column and use that to show a dropdown or something else to let the user choose from the text values to filter on .
I have tried to do it like the checkbox examples but I'm not successful with this to look and function proper.

Any help and pointers on this would be appreciated .

Regards,
Mehmet

Hi @mcanavar,

You would need to use code to filter the data grid. Handle the Change event of the DropDown and set the property to which the data grid is bound to. Here is an example of the Change event of the DropDown

The expression is

${getOrdersResult.filter(o => this.orders.length == 0 || this.orders.includes(o.UserName))}

Where

  1. getOrdersResult is the property which contains the result of the getOrders Data Source method.
  2. orders is the property which the Value of the DropDown is set to.
  3. filteredOrders is another property which the Data of the DataGrid is set to.