Hi!
I have been puzzling to get the RadzenDataGrid to work in virtualized mode with a remote odata provider. I managed to with the help of a class from this forum to convert the Filters list to a odata filter string (with some work arounds).
My attempt is located here (a blazor server project with an odata API and a WASM client)
[marinusklaassen/BlazorRadzenDataGridTests (github.com)]
I have some questions about the way to deal with the filters:
- Looking at the Radzen odata example it should be possible to just the args.Filter string. However in arg.Filter property has to following filter string, which results in an error:
(Name == null ? "" : Name).ToLower().Contains("10".ToLower())
I would expect the following filter string:
Contains(ToLower(Name), ToLower('10'))
I am missing some step here?
- Somebody on this forum built the FilterDescriptorExtensions GetColumnODataFilter. However it does not seem to play well with column where the data type is a boolean or number.
This part here always returns a type of string: var filterPropertyType = column.Property.GetType();
Which gets me to the following: How can I determine the data of the property where the column is bound to?
For now as a quick workaround I did the following:
if (property == "IsVerified") // Quick fix.
{
return $"{property} eq {value.ToLower()}";
}
With kind regards,
Marinus