QueryBuilder - Is there a way to filter on an ENUM column?

My data source model has enum columns. I've tried to add those columns to the QueryBuilder but the app crashes when calling GetFilteredRecords inside the RuleChanged handler with "Object reference not set to an instance of an object" exception. 


I have found a related question regarding the DataGrid control, and tried to replicate it with the QueryBuilder but have been unsuccessful: https://www.syncfusion.com/forums/156213/application-crashes-when-filter-is-enabled-on-an-enum-field


Is there a way to add enum columns to the QueryBuilder?


Stack trace:

   at Syncfusion.Blazor.Data.QueryableOperation.GetColumnType[T](IQueryable`1 dataSource, String filterString, Type type)

   at Syncfusion.Blazor.Data.QueryableOperation.PredicateBuilder[T](IQueryable`1 dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)

   at Syncfusion.Blazor.Data.QueryableOperation.PerformFiltering[T](IQueryable`1 dataSource, List`1 whereFilter, String condition)

   at Syncfusion.Blazor.DataOperations.PerformFiltering[T](IEnumerable`1 dataSource, List`1 whereFilter, String condition)

   at Syncfusion.Blazor.QueryBuilder.SfQueryBuilder`1.GetFilteredRecords()


1 Reply 1 reply marked as answer

KV Keerthikaran Venkatachalam Syncfusion Team March 27, 2024 05:11 PM UTC

Hi Marcel,


We have validated the reported query, and currently we don’t have enum-type column support in the query builder.


We have considered your requirement as a feature request “Provide the enum type column support to query builder" and logged a feature report for it. You can track the status of this feature by using the following feedback report link.


Feedback: https://www.syncfusion.com/feedback/40928/provide-the-enum-type-column-support-to-query-builder


We regretfully can't start this improvement feature immediately since we prioritized bug fixes and features that came before them in the queue for forthcoming releases. The time between releases is typically at least three months. Every release cycle, we assess all open features again during the planning phase and decide which ones to deploy based on a number of criteria, such as the product vision, technology viability, and user interest. The feedback will be moved to scheduled status with an estimated delivery period whenever we have more information to provide regarding the development of these features. We appreciate your patience until then.


Please let us know if you need any further assistance on this.


Regards,

KeerthiKaran K V


Marked as answer
Loader.
Up arrow icon