WinForms / VB.net / .NET 4.0 / Visual Studio 2010
I have a gridview which is using ColumnGroupsView to group certain fields, which is all working fine.
However, there is an issue when exporting using the SpreadExport function. If my grid is:
Group 1
---Column 1
---Column 2
---Column 3
Group 2
---Column 4
---Column 5
Group 3
---Column 6
---Column 7
When exported, the row with the group names in, has the first 3 cells merged for "Group 1", the next 2 cells merged for "Group 2" and the next 2 cells merged for "Group 3" as you would expect, and each has the relevent columns underneath it.
If you hide a column 3 using the gridview though, then export, the group headers still have the same number of cells merged, which means that under "Group 1" you now see Column 1, Column 2, Column 4. Under "Group 2" you now have Column 5, Column 6. Under "Group 3" you have Column 7 and a blank column.
How can I fix this?
Thanks