This is a migrated thread and some comments may be shown as answers.

why my code is not working properly? Grid bound to model. Disable server sorting and filtering.

1 Answer 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mic
Top achievements
Rank 1
Mic asked on 15 Nov 2012, 02:02 PM
@(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?

1 Answer, 1 is accepted

Sort by
0
Atanu
Top achievements
Rank 1
answered on 20 Nov 2012, 07:10 AM
Have you tried setting the .AutoBind property to false of the grid.
Tags
Grid
Asked by
Mic
Top achievements
Rank 1
Answers by
Atanu
Top achievements
Rank 1
Share this question
or