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

Passing Parameters to Controller when Exporting to Excel

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 


1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team 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 

Live Chat Icon For mobile
Up arrow icon