I have an ultragrid that has three different bands (Customer->Categories->Accounts).Currently, when I export, it exports it as you would expect with the different tiers that are expandable to view in the spreadsheet. I would like to be able to export a "flattened" version of the data instead or in addition to.
I have attached an image of how it looks now and how I would like for it to look.
I figure it will be a manual process compared to just using the ExcelExporter but I don't know where to start.
Thanks.
This would be pretty tough to achieve. You could handle the events of the UltraGridExcelExporter like CellExporting. In this event, you are given the current worksheet row and column index and these properties are settable. So when you come to the"Tot_Dep" cell, you could write out the information from the child row cells, instead, and then shift the current column index over by two cells. But the problem with this is that all of the code which translate the grid cell appearance into Excel would not happen. So you would have to essentially re-write that code in some way if the appearances of the cells is important to you.
As part of this approach, you would probably want to handle BeginExport and modify the ExportLayout so that all but the first band in the grid is Hidden, so that the child bands are not exported.
Hi Kevin,
<http://help.infragistics.com/NetAdvantage/WinForms/2010.2/CLR2.0?page=WinGridExcelExporter_Export_Grid_Data_To_Excel.html> is a good starting point.
<http://help.infragistics.com/NetAdvantage/WinForms/2010.2/CLR2.0?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.html> could also be useful it sounds.
Looking at the image it appears you can export the grid normally with DataExportMode = AllDataInDataSource and then handle the EndExport and manually update the worksheet cells you want below the exported grid. You also have the CellExported and CellExporting events to fine tune the export.