I have a grid that has worked perfectly fine for nearly a year now, however when I updated to the latest kendo release it has started generating an error when trying to sort by any of the columns.
It's generating the following error
Invalid property or field - 'undefined' for type: worldStatsItem
Where worldStatsItem is the type of item used in the grid.
I'm using teh MVC bindings for this and the code for the grid is below.
It's generating the following error
Invalid property or field - 'undefined' for type: worldStatsItem
Where worldStatsItem is the type of item used in the grid.
I'm using teh MVC bindings for this and the code for the grid is below.
@(Html.Kendo().Grid(Model.Results)
.Name(
"Search_Results"
)
.Columns(columns =>
{
columns.Template(m => Html.ActionLink(m.StatsItem.OutfitName,
"OutfitByID"
,
"OutfitDetails"
,
new
{ outfitId = m.StatsItem.OutfitId},
null
)).Title(
"Name"
).Width(200);
columns.Bound(m => m.World).Width(100).Title(
"Server"
);
columns.Bound(m => m.StatsItem.Faction).Width(100).Title(
"Faction"
);
columns.Bound(m => m.StatsItem.TotalMembers).Width(100).Title(
"Total Members"
);
columns.Bound(m => m.StatsItem.TotalXP).Width(100).Title(
"Total XP"
);
columns.Bound(m => m.StatsItem.KdRatio).Width(100).Title(
"Ratio"
);
columns.Bound(m => m.StatsItem.AverageXp).Width(100).Title(
"Average XP Per Member"
);
})
.Sortable(sorting => sorting.Enabled(
true
))
.Pageable(pageable => pageable.ButtonCount(5))
.DataSource(dataSource => dataSource
.Server()
.PageSize(40)
.Sort(sort =>
sort.Add(x=>x.StatsItem.AverageXp).Descending())
))