I'm exporting data from a 'Grouped by' grid into Excel. When I open Excel, the GroupedBy columns are shown as in the grid, with the '+' . But I would like to know if it is possible to show the data in Excel fully expanded automatically.
In the grid this can be done with the ExpandAll command, but how can I do this in the Excelexport?
It may also be necessary to remove/alter the grouping when exporting. Is there a way to achieve this?
You can expand all groups by iterating over all Rows and setting their Hidden properties to False.
It does not seem to work. When I open the exported file in Excel, it is shown with the grouped fields still collapsed. I used the InitializeRow method of the Excelexporter to set the Hidden property to false.
Did I use the correct method?
protected void UltraWebGridExcelExporter1_InitializeRow(object sender, ExcelExportInitializeRowEventArgs e) { e.Row.Hidden = false; }