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
close icon

export to excel issues

I have two questions regarding export gridgroupcontrol to excel,
1, in the export excel, it has a filter row with values 'FilterBar, GridFilterBarRow', how can I remove this?

2, When export a control with nested tables, it has message 'Child tables (# Items)', anyway I can remove this also?

Thanks


1 Reply

RB Ragamathulla B Syncfusion Team August 12, 2011 06:59 AM UTC

Hi Rayzhahng,

Thank you for your interest in syncfusion products.

You can achieve your desired using ExportElement event. The following code explain the same.

converter.ExportElement += new GroupingGridExcelConverterControlExt.GridExportElementEventHandler(
converter_ExportElement);
void converter_ExportElement(object sender, GridExportElementEventArgs e)
{
if (e.Element.Kind == DisplayElementKind.Empty)
e.Cancel = true;
if (e.Element.Kind == DisplayElementKind.FilterBar)
e.Cancel = true;
if (e.Element.Kind == DisplayElementKind.Caption)
e.Cancel = true;
}

Please refer the following sample which illustrate the same.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GCCExportElements671560092.zip

Let me know if you have any concern.

Regards,
Ragamathullah B.


Loader.
Live Chat Icon For mobile
Up arrow icon