Hello,
I have an entity with regular properties as well as navigation properties.
The grid fails to load anything If any item in the whole DataSourceResult has any of navigation properties populated (if any entity has has any other entity associated with it).
I do not want to use any of the data from the navigation properties in the grid, I want to only use the regular properties.
Controller:
View:
If I clear all the associated tables and just have the people table populated the grid works fine.
Anyone have any ideas?
I have an entity with regular properties as well as navigation properties.
The grid fails to load anything If any item in the whole DataSourceResult has any of navigation properties populated (if any entity has has any other entity associated with it).
I do not want to use any of the data from the navigation properties in the grid, I want to only use the regular properties.
Controller:
public
ActionResult GetPeopleData([DataSourceRequest] DataSourceRequest request)
{
return
Json(db.People.ToDataSourceResult(request));
}
@(Html.Kendo().Grid<Models.Person>()
.Name(
"PeopleGrid"
)
.Columns(columns =>
{
columns.Bound(p => p.Id).Groupable(
false
).Visible(
true
);
columns.Bound(p => p.LastName);
columns.Bound(p => p.FirstName);
})
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action(
"GetPeopleData"
,
"People"
))
)
.Events(events => events.Change(
"PeopleGrid_RowSelected"
))
)
If I clear all the associated tables and just have the people table populated the grid works fine.
Anyone have any ideas?