Hi, Luc,
The parameterMap of the Ajax() transport is designed to convert the inner request options in such way so they are intercepted on the server by the DataSourceRequest attribute and class.
A request with the query parameterized as pictured below to a controller action will be automatically deserialized giving you the components of the query - Filter, Sort, Group, Page, PageSize etc. and the extension method can be used to perform all the operations at once. In other words, there is no need for this to be done programmatically as it is already available when the expected parameters are as follows:
public ActionResult Customers_Read([DataSourceRequest]DataSourceRequest request)
{
DataSourceResult result = customers.ToDataSourceResult(request);
return Json(result);
}
If you wanted to perform the same query on the client and issue one request that has these components, you can use the query() method of the data source - pass the grid.dataSource sort(), filter(), group(), etc. at once:
https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/query
someWidget.dataSource.query({
page: grid.dataSource.page(),
sort: grid.dataSource.sort(),
filter: grid.dataSource.filter(),
group:grid.dataSource.group()
});
In case this is not the answer you were hoping for, could you explain the workflow in the project step by step and the desired end result so I can provide you with a more suitable suggestion.
Regards,
Alex Hajigeorgieva
Progress Telerik
Progress is here for your business, like always.
Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.