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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to pass additional parameter to server while exporting

Platform: ASP.NET Web Forms |
Control: Grid

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







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




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.

2X faster development

The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile