Hello,
In a .net 5.0 application using MVC, I have a grid that has been defined as Html.Kendo().Grid<dynamic>() because it needs to have dynamically generated columns (a mix between static and dynamic columns).
Html.Kendo().Grid<dynamic>()
/*..*/
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
.EnableCustomBinding(true)
.Columns(columns =>
{
for (int i = 0; i < Model.TotalDimensions * 2; i++)
{
columns
.Bound(Model.Data.Columns[i].DataType, Model.Data.Columns[i].ColumnName)
.Title(Model.Data.Columns[i].Caption)
.ClientGroupHeaderTemplate($"{Model.Data.Columns[i].Caption} #= value #")
.Width(100);
}
}
/*..*/
I am attempting to override the behavior of the filter UI. The documentation states that I should use this syntax:
columns.Bound(/*..*/).Filterable(filter => filter.UI("filterFunction")
Unfortunately, since the grid model has been defined as dynamic, the above line does not compile.
Is there a workaround for this?