I am using SyncFusion.Blazor v19.1.0.45
I had posted this issue as part of another post related to dropdownlist defined in the <GridColumn ...> <FilterTemplate ...> not rendering on initial display but it didn't get addressed and I do not think this issue is actually part of the issue related to the control not displaying. This issue occurs after I refresh the page and the control then appears. When I try to use it to do a filter for an enum type in my ODataV4 API back end, it does not return any results. The reason is described below.
My ODatav4 API (Microsoft ASP.NET Core 3.1 with Microsoft's ODataV4 implementation) is throwing a Status 400 from the $filter query.
The AccountType is an ENUM in the API. In Postman, I can send a GET with the following filter;
$filter=(AccountType eq EII.CDAPI.Server.Enums.AccountTypes'Reseller')&$skip=0&$top=10
and get the expected results.
However, the output of the Grid.FilterByColumn() method wraps everything inside the parentheses in single quotes, as follows;
$filter=('AccountType eq EII.CDAPI.Server.Enums.AccountTypes'Reseller'')&$skip=0&$top=10
Note the single quote that I have highlighted in red.
Here is the actual filter line captured in Fiddler;
/v1/accounts?$count=true&$filter=(AccountType%20eq%20'EII.CDAPI.Server.Enums.AccountTypes%27Reseller%27')&$skip=0&$top=10
Which results in a status 400 error complaining about the extra single quotes.
Here is my call to the Grid.FilterByColumn method;
Grid.FilterByColumn("AccountType", "equal", $"EII.CDAPI.Server.Enums.AccountTypes'{args.Value}'", null, true);
Any idea how to work around this?