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

How to Export data in excel from Group Data Grid

Hello
We are using Visual Studio 2008.during working we made use of GridGrouping Control but its not providing facility to export data in excel.

10 Replies

AR Arulpriya Ramalingam Syncfusion Team July 31, 2017 10:46 AM UTC

Hi Deepak,  
  
Thanks for your interest in Syncfusion products.  
  
The GridGroupingControl have the support to export the data from Grid to Excel and it can be achieved by using GroupingGridExcelConverter class. To avail this support , please ensure to add Syncfusion.GridConverter.Windows.dll in your project. Please make use of below UG link and sample,  
  
Code snippet  
  
  
GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();  
// Export the contents of the Grid to Excel  
converter.GroupingGridToExcel(this.gridGroupingControl1, "Grid.xls", ConverterOptions.Visible);  
  
  
  
Dashboard sample link: <Install Location>\Syncfusion\EssentialStudio\<Product version>\Windows\Grid.Grouping.Windows\Samples\Exporting\Excel Export Demo\cs  

The GridGroupingControl have support to export the grid to PDF and Word also. Please refer to the below UG link and samples,  
  
  
Dashboard sample link: <Install Location>\Syncfusion\EssentialStudio\<Product version>\Windows\Grid.Grouping.Windows\Samples\Exporting  
  
Regards,  
Arulpriya  



AR Arulpriya Ramalingam Syncfusion Team July 31, 2017 10:46 AM UTC

Hi Deepak,  
  
Thanks for your interest in Syncfusion products.  
  
The GridGroupingControl have the support to export the data from Grid to Excel and it can be achieved by using GroupingGridExcelConverter class. To avail this support , please ensure to add Syncfusion.GridConverter.Windows.dll in your project. Please make use of below UG link and sample,  
  
Code snippet  
  
  
GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();  
// Export the contents of the Grid to Excel  
converter.GroupingGridToExcel(this.gridGroupingControl1, "Grid.xls", ConverterOptions.Visible);  
  
  
  
Dashboard sample link: <Install Location>\Syncfusion\EssentialStudio\<Product version>\Windows\Grid.Grouping.Windows\Samples\Exporting\Excel Export Demo\cs  

The GridGroupingControl have support to export the grid to PDF and Word also. Please refer to the below UG link and samples,  
  
  
Dashboard sample link: <Install Location>\Syncfusion\EssentialStudio\<Product version>\Windows\Grid.Grouping.Windows\Samples\Exporting  
  
Regards,  
Arulpriya  



DE Deepak August 8, 2017 02:03 PM UTC

First of all i would like to say thank you to give me positive response.i tried all these things but still problem in same.



AR Arulpriya Ramalingam Syncfusion Team August 9, 2017 12:23 PM UTC

Hi Deepak,     
   
Thanks for your update.   
   
We have analyzed your scenario, but unfortunately we were unable to reproduce the issue at our end. Please ensure that the Syncfusion.GridConverter.Windows.dll assembly and Syncfusion.GridConverter.Windows name space are included in your project. Please provide the below details that will help us to provide a proper solution at the earliest:  
  
  • The Syncfusion EssentialStudio product version.
  • Code customization of exporting which you have tried or if possible provide the simple sample with issue reproducible.
  • Details of exceptions/issue if any you faced.
   
Regards,   
Arulpriya   



DE Deepak replied to Arulpriya Ramalingam August 15, 2017 04:50 PM UTC

Hi Deepak,     
   
Thanks for your update.   
   
We have analyzed your scenario, but unfortunately we were unable to reproduce the issue at our end. Please ensure that the Syncfusion.GridConverter.Windows.dll assembly and Syncfusion.GridConverter.Windows name space are included in your project. Please provide the below details that will help us to provide a proper solution at the earliest:  
  
  • The Syncfusion EssentialStudio product version.
  • Code customization of exporting which you have tried or if possible provide the simple sample with issue reproducible.
  • Details of exceptions/issue if any you faced.
   
Regards,   
Arulpriya   


1.The Syncfusion EssentialStudio product version is 14.4.0.15

2.Code customization of exporting which you have tried or if possible provide the simple sample with issue reproducible

Dim converter As New GroupingGridExcelConverterControl()

converter.ExportBorders = True

converter.ExportImage = True

converter.GroupingGridToExcel(Me.LSTFEEREGISTER, "FileName.xls", ConverterOptions.Default)

3.Details of exceptions/issue if any you faced

 GroupingGridExcelConverterControl() is not valid function



AR Arulpriya Ramalingam Syncfusion Team August 16, 2017 03:58 PM UTC

Hi Deepak, 
 
Thanks for your update. 
 
We have tried to reproduce the reported issue at our end. We suspect that the reported issue occurred due the assemblies are not referred properly. Please refer to the attached video and sample and confirm us that whether the issue occurred in the attached sample. 
 
Ensure to add the below details in your project. 
  • Syncfusion.GridConverter.Windows.dll, Syncfusion.XlsIO.Base.dll assemblies.
  • Namespaces:
    • using Syncfusion.XlsIO;
    • using Syncfusion.GroupingGridExcelConverter;
  • Ensure that whether the assemblies are referred properly as in below image.
 
 
 
 
Note: 
If still the issue is occurred, please provide us with your work sample. It would be more helpful for us to provide the exact solution at the earliest. 
 
Regards, 
Arulpriya 



DE Deepak August 17, 2017 11:32 AM UTC

Thank you for Quick Reply.i am checking this and reverting you ASAP.



AR Arulpriya Ramalingam Syncfusion Team August 18, 2017 04:45 AM UTC

Hi Deepak, 
 
Thanks for your update. 
 
We will wait, until we hear back from you. 
 
Regards, 
Arulpriya 



BM Ben Martin December 21, 2020 12:18 PM UTC

Follow these steps export data in excel from group data grid

1) Create RadContextMenu and get the right-clicked group header row by using the MouseDown event and the GetGridGroupHeaderRowElement method. After determining the clicked group row, you can get its child rows. Then simply show the context menu:

2. Since the export to excel methods do not support exporting only specified records, you can work-around this if you temporarily hide the unnecessary rows and use class with the 

DonNotExport

 for 

HiddenRowOption

 properties.

3. In the click event of the context menu item, mark the rows in the RadGridView.Rows collection that match the rows of the child collection by setting their 

IsVisible

 property to 

true

, and all the rest to 

false

. Then simply export RadGridView with 

HiddenRowOption

 set to 

HiddenOption.DoNotExport

:

I hope this helps!

Ben Martin

Apps4Rent




AR Arulpriya Ramalingam Syncfusion Team December 22, 2020 06:40 PM UTC

Hi Ben,

Greetings from Syncfusion.

We suspect that you are trying to add context menu for GridGroupingControl on right click. We already provided the details in our user guide and please make use of the below UG for further details.


Moreover, the exporting for the column/row headers can be included or avoided by using the below code example.


Please get back to us if you need any further assistance.

Regards,
Arulpriya


Loader.
Live Chat Icon For mobile
Up arrow icon