Custom filtering a column with a List

I have a Grid that's filled with data from a model except for a column whose value is sourced from a dictionary. Is it possible to use this dictionary or just a list of values from this dictionary to filter that column?


3 Replies

RN Rahul Narayanasamy Syncfusion Team January 27, 2022 01:54 PM UTC

Hi Nick, 

Greetings from Syncfusion. 

We suspect that you want to perform filtering operation for the GridColumn which is bound as a dictionary value. We need some details regarding this query to proceed this further. Could you please share the below details which will be helpful to validate and provide a better solution. 

  • Full Grid code snippets.
  • How you are binding the dictionary values to the GridColumn?
  • Whether did you want to perform filtering operation for dictionary value column?
  • Share more details about your requirement.

Regards, 
Rahul 



NI Nick January 27, 2022 03:43 PM UTC

I have attached a sample. My dictionary values come from a source separate from the one that fills the Grid. I am using the value of one column to get the value in other column using the dictionary. 

Yes, I want to filter the dictionary value column similar to the other GridColumn .


Attachment: BlazorAppTest_52e6c710.zip


RN Rahul Narayanasamy Syncfusion Team January 28, 2022 12:51 PM UTC

Hi Nick, 

Thanks for the update. 

Based on your shared details, we have checked query with your provided sample. You have shown the dictionary values in GridColumn using ColumnTemplate feature. So there is no Field is present in this GridColumn which shows the dictionary values. By default, the data operations(such as filtering, sorting, searching) will be performed based on the Field property of GridColumn in DataSource. So it is not possible to perform the data operations(filtering, sorting) in this column.  

Please let us know if you have any concerns. 

Regards, 
Rahul 


Loader.
Up arrow icon