On Datagrid Filters I would like to add additional custom filters.

On Datagrid Filters I would like to add a custom filter for the Values 

For example, I have an order with a Decision parameter which is an Enum (Pass, Fail, Pending) on top of those values I want to add 1 more filter option which is not defined on the Enum -  "Low in stock" based on logic.  

if(Order.Decision == Decision.Pass && Order.IsInLowStock)


Is it possible to add a filter option so I could select  Pass, Fail, Pending &  Low in stock without editing my enum and database? 

As of right now, I can add Low in Stock only inside a template for the cell but not for the filter and I can only edit filter to display it as Pass/ Low in stock

Image_9232_1712246231595Image_7004_1712246340067


1 Reply

PS Prathap Senthil Syncfusion Team April 9, 2024 12:28 PM UTC

Hi Pawel,

Based on your requirements, we regret to inform you that it is not feasible to achieve your goal without editing Enum values and modifying the database. Additionally, we would like to clarify that data operations will be performed based on the field values rather than the values displayed in the template. The column template feature is solely intended for display purposes. This is the default behavior of grid. Thank you for your understanding.

Reference: https://blazor.syncfusion.com/documentation/datagrid/column-template

Regards,
Prathap s


Loader.
Up arrow icon