Hello
I am struggling to get my column headers to repeat in the excel export, following updating from one version to another.
Previous version: Infragistics2.Win.UltraWinGrid.v8.2 (8.2.20082.2022)
Now using version: Infragistics2.Win.UltraWinGrid.v12.1 (12.1.20121.1001)
With the previous version, when exporting to excel with 1 or more grouped columns, the headers would appear at the top of each set of grouped data, rather than just once, at the top of the sheet. After upgrading to the version I'm on now, this functionality has disappeared, and I now only see the column headers once at the top of the sheet. This is without me changing anything.
I have made sure that the ViewStyle of the export is set to MultiBand, and that ViewStyleBand property is set to OutlookGroupBy. Also, the HeaderPlacement property of the export object is set to RepeatOnBreak. Although, changing this to any of the other options makes no difference.
To clarify where I am doing this, I am handling the ExportStarted event of the Export object and using:
e.Layout.ViewStyle = ViewStyle.MultiBand e.Layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy e.Layout.Override.HeaderPlacement = HeaderPlacement.RepeatOnBreak
Maybe I am missing something obvious, or if not, let me know if you need me to send further details.
Thanks in advance.
Hi,
I'm just checking on the status of this issue. Have you had the chance to run my sample and see if you get the sample results?
Hi Mike
Thank you for your assistance.
With my scenario, I need the grid to show the column headers just once, at the top, as it does now. However, it is only the export to excel where I need the headers to be grouped. This is really what has confused me when comparing the previous version to my current version. With my code as it was before updating, the export was grouping the headers as I required, despite the source grid showing the headers just once at the top. After updating the controls, both are now showing headers once at the top.
I think I will check that I have the very latest version as you suggested, but if no luck, perhaps I could try changing the grid, rather than trying to intercept the export and changing the properties of that. Maybe if I change the state of the grid just before the export, and then revert it once the export has finished, this may give me what I need.
Thanks
Andrew