@(Html.Kendo().Grid(Model).Name("gridName")
.Columns(columns =>
{
columns.Bound(o => o.Name);
columns.Bound(o => o.Surname);
columns.Bound(o => o.Timespan);
}).DataSource(d=>d.Ajax().Model(m=>m.Id("Name")).ServerOperation(false))
.Filterable().ColumnMenu().Sortable()
)
The code above makes my grid to sort and filter without GET request to server, but it loads content twice - first becuease of ...Grid(Model)... and secondly beacause of ....DataSource(d=>d.Ajax().Model(... and column with Timespan shows [object Object] after 'second' load. How to correct it?
.Columns(columns =>
{
columns.Bound(o => o.Name);
columns.Bound(o => o.Surname);
columns.Bound(o => o.Timespan);
}).DataSource(d=>d.Ajax().Model(m=>m.Id("Name")).ServerOperation(false))
.Filterable().ColumnMenu().Sortable()
)
The code above makes my grid to sort and filter without GET request to server, but it loads content twice - first becuease of ...Grid(Model)... and secondly beacause of ....DataSource(d=>d.Ajax().Model(... and column with Timespan shows [object Object] after 'second' load. How to correct it?