Hi everyone,
not sure if I found a bug or if i'm just doing it wrong.
What I try is to create a grid that is per default grouped with GroupPaging and has a checkbox selection column with PersistSelection.
However I only get a js error "Cannot read property 'undefined' of undefined" @init._restoreSelection (kendo.all.min.js:62).
I tried adding an Id field but it still doesn't work. Only changed error to "Cannot read property 'Id' of undefined".
If I remove the PersistSelection it works fine.
Html.Kendo().Grid<MyViewModel>() .Name("myGrid") .Columns(c => { c.Select().Width(50); c.Bound(x => x.Id).Hidden(); c.Bound(x => x.ArticleNo); c.Bound(x => x.ArticleGroup).ClientGroupHeaderTemplate("<input class=\"k-checkbox groupSelect\" type=\"checkbox\"> #= value #").Hidden(); }) .PersistSelection() .ToolBar(t => t.Search().Text(Localizer.Lang_SearchInTable)) .Events(x => x.DataBound("eventMyGridDataBound")) .DataSource(dataSource => dataSource .Ajax() .PageSize(50) .GroupPaging(true) .Group(x => x.Add(y => y.ArticleGroup)) .Read("GridRead", "Article") .Model(m => { m.Id(f => f.Id); m.Field(f => f.ArticleNo); m.Field(f => f.ArticleGroup); }))
Best Regards
Nils