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 Mike,
I'm having the same problem in my application -- when I use the exporter with a multi-banded grid, in the resulting spreadsheet I only see the header for the child band once (at the top). In the grid itself, the headers are repeated.
I downloaded and ran your sample application posted above with my version of Infragistics (14.2.20142.2010) and the spreadsheet works as expected, with headers repeating. So presumably something in my application code is flipping a setting. But I tried setting the HeaderPlacement flag to RepeatOnBreak and am still having the problem. Are there any other variables I should be looking at that might affect the export?
Hi Stephen,
Well, I would have thought that the bug would have been fixed long before that version. But I could be wrong. There is a much newer service release available and I just tested it out to make sure it works and it does.
BTW... showing the column headers under each group is the default, both on-screen and in the export.
So if it's not working, either this is the result of the bug and you don't have the fix, or else something else in your application is explicitly changing the HeaderPlacement in your export layout.
I recommend that you get the latest service release.
How to get the latest service release - Windows Forms - Service Releases
If you still have a problem, then see if you can reproduce the issue in a small sample project and I would be happy to take a look.
We are using v14.1.20141.2019.
What version of the grid are you using?
As I mentioned above, the HeaderPlacement was not honored when exporting in older versions. That was a bug and it's now fixed. So you might need to get the latest service release, or possibly upgrade if you are using a particularly old version.
I have the same problem, only adding the following does not repeat the headers in the grid:
Private Sub ExcelExport_ExportStarted(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.ExportStartedEventArgs) Handles gExcelExporter.ExportStarted e.Layout.Override.HeaderPlacement = Infragistics.Win.UltraWinGrid.HeaderPlacement.RepeatOnBreak End Sub
Notice the header at the very top, but not repeated for each group (Order Date)
What other settings should I look for?