Tuesday, 17 September 2013

pagination not working after doing filter inKendo grid

pagination not working after doing filter inKendo grid

I am having an mvc application and my view is .cshtml. I am making a Kendo
grid by using DataSource with server binding , I have made my own
pagination for setting the page size . I ran into one issue that when i
filtered the data and then done my own pagination then it does not work as
in Kendo grid in url there comes Grid-page-size which set first times and
it never changed .
How can i solve this ? It will be appreciable if anyone solved this problem?
Here is my code for grid :-
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(o => o.info).Title("Info").Width("150px");
columns.Bound(o => o.name).Title("Name").Width("90px");
columns.Bound(o => o.address).Title("Address").Width("100px");
columns.Bound(o => o.city).Title("City").Width("85px");
columns.Bound(o => o.state).Title("State").Width("90px");
})
.DataSource(dataSource => dataSource.Server()
.PageSize(Convert.ToInt16(ViewData["PageSize"]))
).Pageable(pager => pager
.Refresh(true)
.Numeric(true)
).Scrollable(scrolling => scrolling.Height("*"))
.Sortable()
.Resizable(resizing => resizing.Columns(true))
.Filterable(filtering => filtering.Enabled(true))
.ColumnMenu()
)

No comments:

Post a Comment