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.

Passing Parameters to Controller when Exporting to Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

130251 May 2,2017 08:56 AM May 3,2017 08:43 AM ASP.NET MVC 1
loading
Tags: Grid
Frankie Moran
Asked On May 2, 2017 08:56 AM

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 

Cheers,
Frankie

Prasanna Kumar Viswanathan [Syncfusion]
Replied On May 3, 2017 08:43 AM

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. 

Regards, 
Prasanna Kumar N.S.V 


CONFIRMATION

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.

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.

;