Hi,
I have a grid where a user can hide/show columns using the FieldChooser (using the ShowColumnChooser). I now want to export to excel the visible columns. In order to do this I have implemented the following event handler:
private void ultraGridExcelExporter1_CellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs e)
if (e.GridColumn.Hidden == true) e.Cancel = true;
e.Cancel = true;
}
This doesnt seem to work and exports all columns including the hidden ones. What is the correct solution? What property does the Field chooser change to make the grid columns visible and invisible?
Using version 5.3....
Thanks in advance
I've implemented exporting the grid (as seen on screen, hidden bands and columns not exported) using:
ultraGridExcelExporter1.Export(uGrid, exportFileName);
this appears to have been around since 5.1...though i've only used it since 7.
if you look to http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=10038 (article for export WITH hidden columns)
'Use the UltraGridExcelExporter’s Export method to export the WinGrid. Handle the BeginExport event of the UltraGridExcelExporter and unhide ny columns you want. Save the sheet to a local directory on the machine.'
Hi
I too have managed to implement this in another grid where I haven't enabled the field chooser and manually set the hidden property of the column. Then the CellExporting eventhandler seems to work fine. The problem seems to when you use the field chooser and that why I would like to find what property it sets to hide/show the column.
Thanks