Hi,
I'm new to Infragistics and am using Ultrawingrid with two bands. When I export the data to excel, the Main band header gets repeated and I dont want that to happen.
I'm ok with the second band header repeating as it only shows when I expand in excel. What should I do so that main header displays only once in the first row?
thanks,
Sri
Thanks Mike, your solution worked.
Hi Sri,
Instead of
e.Layout.Override.HeaderPlacement = HeaderPlacement.FixedOnTop;
try using
e.Layout.Bands[0].Override.HeaderPlacement =
HeaderPlacement.FixedOnTop;
so that HeaderPlacement will be changed for the MainHeader alone instead of all sub band headers. This solved the same issue I was facing.
Regards,Venkatesh
I think this is a known bug that was fixed. You probably just need to get the latest service release.
How to get the latest service release - Infragistics Community
Mike,
I tried the setting FixedOnTop for my MainHeader and it resolved the repetive header issue but now I have a new issue.
All my other band headers are also getting displayed on the top in addition to the normal display of their positions when exported to excel. I tried all settings for the sub headers but they allways display on top of the excel when the main header is set to FixedonTop
thanks,Sri
Assuming you are using the latest version of NetAdvantage, then you can control the appearance of the headers using the HeaderPlacement property.
What you would do here is handle the ExportStarted event of the UltraGridExcelExporter. This event passes you the export layout. This layout is a clone of the DisplayLayout of the on-screen grid. So you can modify the export layout without affecting the on-screen grid.
So use e.ExportLayout.Override.HeaderPlacement to get the behavior you want in the exported Excel file.