i have an asp.net-mvc web page and i am using jqgrid on the front end. i want to have an export to excel button that will export the current set of data (based on the current filter).
i already use the toolbar filter so i see that the filter settings are stored in post data but i can’t figure out how to create a method that will pass along all of the filter settings / rules to the server from jqgrid.
i see a bunch of jqgrid “export to excel” example after googling but similar to this example, none of them seem to be passing the filter information to the serverside.
You could put hidden fields inside the Export to Excel form:
and populate them upon form submission based on the current values:
This way the
ExportToExcelcontroller action will take those parameters and be able to filter the list.