Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Export Layout for Grid Data Export to Excel
posted

Hi

The requirement is to export the grid data to excel format (any xls or xlsx) maintaining the layout, columns widths but without the appearances (i.e. without back color/fore color) while maintaining the DisplayLayout intact. Have tried using the ExportStarted event of UltraGridExcelExporter, tried to reset the appearances but of no use.

Also thought of using ExportLayout on the similar pattern of using PrintLayout as in the InitializePrint event of UltraGridPrintDocument but UltraGridExcelExporter does not seem to support such technique.

Is there any other way to achieve this.

Platform: VS 2010/VB.net, Infragistics v12.1.20121.1001, Dot Net Framework 2.0, Infragistics2.Win.UltraWinGrid.ExcelExport.v12.1

Regards

haraman

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Haraman,

    There's no simple, straightforward way to do this. Removing the Appearances from the export layout is a matter of determining what appearances you applied to the layout and resetting or removing them.

    It shouldn't be too difficult to determine what appearance settings you are applying to the grid's layout, though, and the adding code to remove those specific appearances from the export layout.

    That will take care of any appearances on the layout, bands, or columns. But it may not deal with row or cell appearances, because those are typically handled in the InitializeRow event and this event will fire again for the cloned export rows. This is very simple to handle, though, because all you have to do is put code InitializeRow event to NOT apply those appearances when the layout is an export layout.To detect that, you can check 'e.Row.Band.Layout.IsExportLayout'

Children
No Data