I would like to pass the filter and sort criteria to an action using a toolbar custom command. Ultimately, I'd like to export a CSV or Excel file. What is the best way to go about this?
I first tried the following, but it did not work.
The view
The controller
I first tried the following, but it did not work.
The view
@(Html.Kendo().Grid<KendoGridApplication.Models.Order>() .Name("Grid") .ToolBar(o => o.Custom().Action("Export", "Home").Name("Export")) ...The controller
public ActionResult Export([DataSourceRequest] DataSourceRequest request){ // request.Filters is null // request.Sorts is null