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

Export selected columns from griddatabound to excel

Thread ID:

Created:

Updated:

Platform:

Replies:

127181 Nov 1,2016 09:21 AM UTC May 11,2018 12:10 PM UTC WinForms 4
loading
Tags: GridDataBoundGrid(Classic)
Marius Ovidiu Lancrangean
Asked On November 1, 2016 09:21 AM UTC

Hi,

In my project, after using the FieldChooser, I need to export remaining columns to excel. How can I do this?

Marius

Marius Ovidiu Lancrangean
Replied On November 1, 2016 12:46 PM UTC

Ok. It was simple.
GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();
 
		// Export the contents of the Grid to Excel
		converter.GroupingGridToExcel(this.grid@"C:\temp\Export.xls"ConverterOptions.Visible | ConverterOptions.ColumnHeaders);

Amal Raj Umapathy Selvam [Syncfusion]
Replied On November 2, 2016 07:09 AM UTC

Hi Marius, 

Thanks for using Syncfusion products. 

We are glad to know that you have found the solution for your issue to export the visible columns using ConverterOptions. Please let us know, if you have any queries. 

Regards, 
Amal Raj U. 


Marcus Ricardo Gomes Guedes
Replied On May 10, 2018 07:53 PM UTC

        Dim converter As New GroupingGridExcelConverterControl()

        converter.GroupingGridToExcel(GridC100, "c:\temp\xxx.xls", Syncfusion.GridExcelConverter.ConverterOptions.ColumnHeaders)

Valor de tipo 'Syncfusion.Windows.Forms.Grid.Griddataboundgrid' não pode ser convertido para 'Syncfusion.Windows.Forms.Grid.Grouping.Gridgroupingcontrol'

Translate: Value type 'Syncfusion.Windows.Forms.Grid.Griddataboundgrid' cannot be converted to  'Syncfusion.Windows.Forms.Grid.Grouping.Gridgroupingcontrol'


Hello, i´m getting the error above. Plz help me to know how to export griddatabound to excel using vb.net.
thx

Sindhu Nagarajan [Syncfusion]
Replied On May 11, 2018 12:10 PM UTC

Hi Marcus, 

Thanks for contacting Syncfusion support. 

The GroupingGridExcelConverterControl class is used for exporting GridGroupingControl only. So, we request you to use GridExcelConverterControl class to export the GridDataBoundGrid control.  

Please refer to the below KB document to export data in GridDataBoundGrid to excel sheet. 

Code Example 
private void button1_Click(object sender, EventArgs e) 
{ 
    GridExcelConverterControl gecc = new GridExcelConverterControl(); 
    gecc.GridToExcel(this.gridDataBoundGrid1.Model, "xcel.xls");   
}    


Please let us know if you have any other queries. 

Regards, 
Sindhu  


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.

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

;