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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Passing Parameters to Controller when Exporting to Excel

Thread ID:





130251 May 2,2017 12:56 PM UTC May 3,2017 12:43 PM UTC ASP.NET MVC 1
Tags: Grid
Frankie Moran
Asked On May 2, 2017 12:56 PM UTC

I have three different grids on three different pages and the data is different in all these grids and are defined by a variable called "ModuleId".

The first grid shows all the Risks with the Module Id = 3, the second grid shows all the Issues with the Module Id = 4, an the last grid shows all the Actions with the Module Id = 5. When exporting any of these grids I need to capture the Module Id and pass this to the Controller. From the controller I would select the data using this: 

How would I be able to pass this variable into the controller, and more specifically use it to export the correct data in the excel file?

I have tried a couple of different ways when searching the Internet but nothing seems to work. 

Any help or guidance would be greatly appreciated 


Prasanna Kumar Viswanathan [Syncfusion]
Replied On May 3, 2017 12:43 PM UTC

Hi Frankie, 

Thanks for contacting Syncfusion support. 

In this you need to send the additional parameter to the controller. 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. 
We have already discuss about this in below knowledgebase documentation.  
In above documentation we send the numeric textbox value along with grid model and retrieve it at the server while exporting. So, instead of sending the numeictextbox value we suggest you to send the Module id along with the grid model. 

Prasanna Kumar N.S.V 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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