I am getting loading error when using aspnet Core grid with dynamic columns and Filterable option. The grid is loading fine when the Filterable option is not configured. Also, events are not working properly. I am using 2024.4.1112 version.
Here is sample code
@(Html.Kendo().Grid<dynamic>()
.Name(Model.GridId)
.Columns(columns =>
{
foreach (var col in Model.Columns)
{
var kendoColumn = columns.Bound(col.PropertyName);
kendoColumn.Title(col.Title);
kendoColumn.Width(col.Width);
kendoColumn.Filterable(col.Filterable);
if (!string.IsNullOrEmpty(col.Format))
{
kendoColumn.Format(col.Format);
}
if (!string.IsNullOrEmpty(col.Template))
{
kendoColumn.ClientTemplate(col.Template);
}
if (col.DataType == "boolean")
{
kendoColumn.HtmlAttributes(new { style = "text-align:center" });
}
}
})
.Pageable(p =>
{
p.ButtonCount(10);
p.PageSizes(true);
p.Refresh(true);
})
.Filterable(f => f.Mode(GridFilterMode.Menu))
.Sortable()
.ColumnMenu(c =>c.Filterable(true))
.Reorderable(r => r.Columns(true))
.Resizable(r => r.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Entity", "History", new { entityName = Model.EntityName, pkValue = Model.PrimaryKeyValue, entityType = Model.EntityType, pkName = Model.PrimaryKeyName }))
)
.Events(e => e.Change("ob-select"))
)