This question is locked. New answers and comments are not allowed.
I have a grid with ajax databinding enabled. Sorting, filtering, and paging work fine, however when grouping is enabled it generates the following client side error: Uncaught TypeError: Cannot read property 'Name' of null.
The grid is defined as:
And the controller is defined as:
The repository.GetMyObjects method returns an IQueryable and I'm using the EntityFramework (4.2). Again, sorting, filtering, and paging work fine, this only occurs when enabling grouping.
Any thoughts/suggestions to help track this down?
Thanks!
The grid is defined as:
@(Html.Telerik().Grid<MyObject>() .Name("MyObjectGrid") .Columns(columns => { columns.Bound(o => o.Foo.Name).Title("Foo").Width(500); columns.Bound(o => o.Bar.Name).Title("Bar").Width(100); columns.Bound(o => o.Prop1).Width(100); columns.Bound(o => o.Prop2).Width(100); }) .DataBinding(dataBinding => { dataBinding.Ajax().Select( "GetMyObjects", "MyObjectsController", new { MyRoutingParameter = Model.SomeRoutingParameter, }); }) .Scrollable() .Sortable() .Pageable() .Filterable() .Groupable())And the controller is defined as:
[HttpPost][GridAction]public JsonResult GetMyObjects(MyObjectCriteria criteria){ var result = this.repository.GetMyObjects(criteria); return new JsonResult { Data = new GridModel(result) };}The repository.GetMyObjects method returns an IQueryable and I'm using the EntityFramework (4.2). Again, sorting, filtering, and paging work fine, this only occurs when enabling grouping.
Any thoughts/suggestions to help track this down?
Thanks!