I have relations one to many in DB ( i used entity interface to generate associations between 2 obj) Im getting error: Bound columns require a field or property access expression
My code:
in view:
Html.Telerik()
.Grid<Y.Orders.Models.Orders>("orders")
.Name("Orders")
.DataKeys(dataKeys => dataKeys.Add(o => o.Id))
//.Pageable(paging => paging.PageSize(20).Style(GridPagerStyles.PageSizeDropDown | GridPagerStyles.NextPreviousAndNumeric))
.Columns(columns =>
{
columns.Command(commands =>
{
commands.Custom("comments").ButtonType(GridButtonType.Text).Text("Szczegóły").Action("Index", "Komentarze");
});
columns.Bound(o => o.Tytul).Title("Title");
columns.Bound(o => o.Deliveries.Sum(m=>m.deliveryTime)).Title("Time of order");
})
.Filterable()
.Sortable(sort =>
{
sort.SortMode(GridSortMode.MultipleColumn); sort.OrderBy(ord =>
{
ord.Add(o => o.Time).Descending();
});
})
.Groupable(grouping => grouping.Groups(groups =>
{
groups.Add(c => c.Users.Firms.Name);
}))
.Render();
in entity model:
public ObjectSet<Deliveries> Deliveries
{
get
{
if ((_ Deliveries
== null))
{
_Deliveries = base.CreateObjectSet<Deliveries>("Deliveries");
}
return _Deliveries;
}
}
private ObjectSet<Deliveries> _Deliveries;
In deliveries i havnt any null.
Where is problem ?