I have a page that has a grid and some filter fields (external from the grid). The filtering gets applied to the grid in the JavaScript - which works fine. I also have an export button that I need to export the data in my grid - since my grid does not contain all the data that my export needs, my thought was to pass the DataSourceRequest as a parameter to my Ajax call, select my data and then use the "toDataSourceResult()" as happens in my ajax read controller action. This is not working.
I have the following code in my javascript function that builds my datasource request, and passes it in as a parameter, but my DataSourceRequest object in my controller action contains null values for filter, sort, etc.
var
grid = ${
"#Persons"
).data(
"kendoGrid"
);
var
parameterMap = grid.dataSource.transport.parameterMap;
var
requestObject = parameterMap({ Sorts: grid.dataSource.sort(), Filters: grid.dataSource.filter(), Groups: grid.dataSource.group()});
How can I pass the datasource request as a parameter to my Ajax Controller action? I have attached a working sample project.