I have following code and I am getting e.dataItem as undefined. Is there a way to get access to dataItem and its properties at client using JavaScript?
Html.Kendo().Grid<
AdminReport
>()
.Name("AdminReportList")
.Columns(c =>
{
c.Bound(r => r.Name).Title("Report Name").Width(50);
c.Bound(r => r.Id).Title(action).Width(230).Sortable(false).Filterable(false)
})
.Pageable(p => p.PreviousNext(true))
.Sortable()
.Filterable()
.Events(e => e.DataBound("onRowBound"))
.DataSource(d => d
.Ajax()
.Model(m => m.Id(r => r.Id))
.Read(read => read.Action("_ListAllReports", "AdminReports"))
.Events(e => e.Error("OnError")))
.Render();
function
onRowBound(e) {
if
((e.dataItem.SomeProperty ===
true
)) {
//Some code...
}
}