Hi,
I’m trying to use the filter component with dynamic datasource. (Asp.net MVC)
I'm writing something like this:
@(Html.Kendo().Filter<dynamic>()
.Fields(f =>
{
foreach (var field in Model.Fields)
{
f.Add().Label(field.Label).EditorTemplateHandler(“func”+field.type);
}
}).FilterExpression(f =>
{
f.AddRange(Model.Filters);
}))
For filters, I had to create my own conversion
function (string json -> IFilterDescriptor) because I couldn't get the one
used for the grids to work (= FilterDescriptorFactory.Create)
And now, I am blocked by the dynamic change of operators. These change depending on the type of field. However, I do not pass a field (because dynamic), and I do not have a "SetType" function as for "kendo-ui" (https://docs.telerik.com/kendo-ui/api/javascript/ui/filter/configuration/fields.type)
How can I do ?
Regards
P.S. I'm with v2020.3.915