I'm using a custom data grid column filter template with dropdown that is an Enum type. The filter string for LoadDataArgs looks like 'Status eq CheckedOut'. My web api throws an error trying to map CheckedOut as a property and not an enum value. If I surround CheckedOut in single quotes, it works just fine.
According to OData specifications, the enum value in the filter string should be surrounded by single quotes. Is this custom code I need to write to do this from in the blazor app or does the data grid component provide some sort of extension method to do this?
Status is the property on the model for the data grid. CheckedOut is the Enum name.
Thanks, Enchev for the update. Which nuget package do I need to update? I updated to latest Radzen.Blazor nuget package (4.7.10), but I'm still seeing the issue. Do I need to change my code in any way for this fix to know the type of the column?
@enchev I found the problem. The FilterPropertyType is also coming back as numeric for the Enum type, so the IsNumeric condition is being met first. When I switch the conditions locally, the Enum filter was returned correctly, and my API call went through successfully.
The IsNumeric method is returning true because GetTypeCode returns Int32 for Enum.