Hi I have a kendo grid in my partial view.
And I have bind a model as the grid data source. And mention that my grid don't have a Read method. Instead of read method I have use the model.
Here is my view..
@model Project.MVC.Areas.Razor.Models.CustomerListModel
<div id="dvResultGrid">
@(Html.Kendo().Grid<Portal.Application.BoundedContext.ScreenPop.Dtos.Customer>(Model.CustomerList)
.Name("grdWindowResults")
.Columns(columns =>
{
columns.Bound(x => x.Name1).Visible(true);
columns.Bound(x => x.Name2).Visible(true);
columns.Bound(x => x.ContactName);
columns.Bound(x => x.BillingAddress1);
})
.Pageable()
.Sortable(x => x.Enabled(false))
.Scrollable(x => x.Height("auto"))
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Reorderable(reorder => reorder.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.PageSize(5)
.Model(model =>
{
model.Id(p => p.CustomerId);
})
)
)
</div>
And what I have to do is, I need to do server-side paging for my grid. How can I do that with out a read method. Is there any option?
And I have bind a model as the grid data source. And mention that my grid don't have a Read method. Instead of read method I have use the model.
Here is my view..
@model Project.MVC.Areas.Razor.Models.CustomerListModel
<div id="dvResultGrid">
@(Html.Kendo().Grid<Portal.Application.BoundedContext.ScreenPop.Dtos.Customer>(Model.CustomerList)
.Name("grdWindowResults")
.Columns(columns =>
{
columns.Bound(x => x.Name1).Visible(true);
columns.Bound(x => x.Name2).Visible(true);
columns.Bound(x => x.ContactName);
columns.Bound(x => x.BillingAddress1);
})
.Pageable()
.Sortable(x => x.Enabled(false))
.Scrollable(x => x.Height("auto"))
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Reorderable(reorder => reorder.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.PageSize(5)
.Model(model =>
{
model.Id(p => p.CustomerId);
})
)
)
</div>
And what I have to do is, I need to do server-side paging for my grid. How can I do that with out a read method. Is there any option?