This question is locked. New answers and comments are not allowed.
Hi,
I am trying to use custom ajax binding for paging and filtering Telerik Q2 Grid. The problem is that the Action method (Select) for ajax paging and Filtering gets called but the GridCommand object doesn't reflect the values properly. For Paging I have set PageSize to 1 , but I always receive PageSize = 10 in GridCommand object. For Filtering, the Filters count is 0. So neither paging nor filtering is taking place. Please help me resolve this problem. Here is the code.
regards,
Nirvan.
I am trying to use custom ajax binding for paging and filtering Telerik Q2 Grid. The problem is that the Action method (Select) for ajax paging and Filtering gets called but the GridCommand object doesn't reflect the values properly. For Paging I have set PageSize to 1 , but I always receive PageSize = 10 in GridCommand object. For Filtering, the Filters count is 0. So neither paging nor filtering is taking place. Please help me resolve this problem. Here is the code.
<!-- The View -->
@(Html.Telerik().Grid(Model)
.Name("UserGrid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("_UserList", "User"))
.Filterable()
.Pageable(settings => {
settings.PageSize(1);
settings.Total((int)ViewData["count"]);
})
.EnableCustomBinding(true)
.Columns(col => {
col.Bound(m => m.Id).Width(100);
......
}
// The Controller Ajax Action
[GridAction(EnableCustomBinding=
true
)]
public
ActionResult _UserList(GridCommand command) {
//GridCommand not properly constructed
List<User> users = GetListData(command);
return
View(
new
GridModel { Data = users, Total = count });
}
regards,
Nirvan.