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

Grid Export

Thread ID:





64200 Jul 16,2007 09:04 PM UTC Jul 17,2007 02:11 PM UTC WinForms 2
Tags: GridControl
Asked On July 16, 2007 09:04 PM UTC

When I export my GridGroupingControl to excel I get the caption row and a blank row below the headers.

Is there a way to get rid of the caption row and blank row

I have added a zip file of the example export


haneefm [Syncfusion]
Replied On July 16, 2007 09:46 PM UTC

Hi Nedu,

We have newly added the ExportElement event in Essential Grid v5.1. This event handler allows you to customize of export element from grid to excel. It allows you to remove the element from excel export process.It also enable the changing of the cell definition at excel export process. You can handle this event and set e.Cancel to true to cancel element export from grid to excel. Below is a code snippet that shows this task.

GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();
converter.ExportElement += new GroupingGridExcelConverterControl.GridExportElementEventHandler(converter_ExportElement);
converter.GroupingGridToExcel(this.gridGroupingControl1, saveFileDialog.FileName, options);

void converter_ExportElement(object sender, GridExportElementEventArgs e)
if (e.Element.Kind == DisplayElementKind.AddNewRecord
|| e.Element.Kind == DisplayElementKind.Caption)
e.Cancel = true; // Cancelling export of the GroupCaption and AddNewRecord Element in a grid.


Best regards,

Replied On July 17, 2007 02:11 PM UTC

Thanks Haneef,

I guess I'll have to start thinking about migrating to 5.1

Thank you for the prompt reply


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

This page will automatically be redirected to the 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