Hello
when use Ajax binding sorting and filtering parameter where not correctly passed on server handler:
I usethe following code in my MVC view:
and when I try to sort the get query is the following:
it seems that the sort parameter is not correctly encoded. on my controller the code is the following :
request.Sort and request.filter are NULL
Any suggestion?
when use Ajax binding sorting and filtering parameter where not correctly passed on server handler:
I usethe following code in my MVC view:
<%:
Html.Kendo().Grid<
Totalcom.XBase.Biz.Base.Models.Elements.Element
>()
.Name("Grid").Columns(columns =>
{
columns.Bound(p => p.IsActive).Title("Attivo");
columns.Bound(p => p.Name);
columns.Bound(p => p.Key);
})
.DataSource(dataSource => dataSource
.Ajax() // Specify that the data source is of ajax type
.Model( model =>
{
model.Id (x => x.Key);
model.Field(x => x.IsActive);
model.Field(x => x.Name);
model.Field(x => x.Key);
})
.Sort(sort => sort
.Add(x => x.Name))
.Read(read => read.Action("GetChildren", "Documents", new { Area = "CMS", Id = Model.Key, ApplicationKey = Html.GetSessionInfo().ApplicationKey}))
)
.Sortable()
.Pageable()%>
and when I try to sort the get query is the following:
it seems that the sort parameter is not correctly encoded. on my controller the code is the following :
public ActionResult GetChildren([DataSourceRequest]DataSourceRequest request)
{
...
DataSourceResult result = children.ToDataSourceResult(request);
return Json(result, JsonRequestBehavior.AllowGet);
}
request.Sort and request.filter are NULL
Any suggestion?