I'm trying to "insert" another row in the HeaderRowExportingEvent in order to insert UltraGridGroup headers in the exported excel sheet. UltraGridGroup headers are not exported by the excel exporter for some unknown reason so I'm trying to do this myself.
However, I'm not sure how to insert, or increase the offset. I cannot seem to find any methods to add a new row into the row collection or to increase the current rowsheet index to write one row after.
void _excelExporter_HeaderRowExporting(object sender, HeaderRowExportingEventArgs e){ if (e.Band.Groups.Count > 0) { // Insert a new row and write the group headers }}
Doesn't the event args in this event have a CurrentRowIndex or something like that which you can increment? Almost all of the UltraGridExcelExporter events do. You should be able to simply write your header into the current row and then increment the index so that the exporter will put the headers on the next line.
Yes you are right. I was looking all over the WorksheetRow for the method/property when it was instead in the HeaderRowExportingEventArgs
e.CurrentRowIndex++ does the trick.