Hello,
I would like the Kendo grid to use the Model (local data) to initialize the data part and after that I want the grid to do the paging and sorting on the client side only and not go to server at all.
Based on other examples by Kendo I used datasource with the Ajax() call with and ServerOperation set to “false” with no Read(). What happens is interesting grid goes blank and before doing that grid appears to call [HttpGet] method on the controller as if it is a fresh page request. I was assuming that it will not go back to the server again because of ServerOperation(false) condition.
Here is my grid call. Please tell me what I am doing wrong.
Thanks for your help.
Please note: If I disable the datasource line by commenting out, grid displays collected data but paging or sorting won't work as expected as I have not implemented on the server side.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(model => model.Status);
columns.Bound(model => model.Created);
columns.Bound(model => model.Name);
columns.Bound(model => model.ID);
columns.Bound(model => model.ViewImage);
})
.Pageable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(3)
.ServerOperation(false)
)
)
I would like the Kendo grid to use the Model (local data) to initialize the data part and after that I want the grid to do the paging and sorting on the client side only and not go to server at all.
Based on other examples by Kendo I used datasource with the Ajax() call with and ServerOperation set to “false” with no Read(). What happens is interesting grid goes blank and before doing that grid appears to call [HttpGet] method on the controller as if it is a fresh page request. I was assuming that it will not go back to the server again because of ServerOperation(false) condition.
Here is my grid call. Please tell me what I am doing wrong.
Thanks for your help.
Please note: If I disable the datasource line by commenting out, grid displays collected data but paging or sorting won't work as expected as I have not implemented on the server side.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(model => model.Status);
columns.Bound(model => model.Created);
columns.Bound(model => model.Name);
columns.Bound(model => model.ID);
columns.Bound(model => model.ViewImage);
})
.Pageable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(3)
.ServerOperation(false)
)
)