We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to pass additional parameter to server while exporting

How to pass additional parameter to server while exporting

The Export feature in Grid will allow the user to export the grid content to Excel, PDF or Word file formats. And the Grid model will be posted to the server on export operation.

If we want to send any additional parameter to the server then we can do this by adding the additional parameter to the grid model and retrieving it at the server side.

Let us discuss how to send a numeric textbox value along with grid model and retrieve it at the server while exporting.

Grid Initialization

JS

 

MVC

 

ASP

 

The toolbar click handler for the MVC and ASP initialized Grid is as follows.

 

Controller

 

We have used the Web API controller to perform the export operation and we can also MVC controllers or ASP.Net web methods to perform export.

The following is the output generated from the above code example.

Figure 1: Grid with export enable and numeric textbox

Figure 2: Retrieving the additional parameter at the server side.

Figure 3: Exported Excel document.

Article ID: Published Date: Last Revised Date: Platform: Control:
5441 09/22/2015 09/22/2015 ASP.NET Web Forms Grid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon