Hi Paul,
I have created CAS-85320-P35SLL to further investigate this issue for you and I will be providing you with further updates via the case.
If you have any further questions regarding this issue, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
That is not at all what I am saying. I do indee want the column headers of the first band on top, however what I do not want are the column headres of the second band on top, immediately underneath of the column headers of the first band.
When I specifically set the band[0] column header to fixed top (via the HeaderPlacement property) and do nothing else in the code the band[1] column headers appear immediately below them as shown in my screen shot. I would think that specifiying .....band[0].HeaderPlacement = HeaderPlacement.FixedOnTop; would have no bearing on the band[1] headings.
Prior to calling the Export which I've placed in a resuable class, if I do the following (and nothing else) the band[1] column headings will appear immediately below the band[0] headings:
{
gvEmployeeEarnedHours.DisplayLayout.Bands[0].Override.HeaderPlacement = Infragistics.Win.UltraWinGrid.
HeaderPlacement.FixedOnTop;
helper.ExportGridToExcel(
"Earned Hours", gvEmployeeEarnedHours, Infragistics.Documents.Excel.WorkbookFormat.Excel97To2003);
}
In order to mitigate the effect I was seeing in my exported grid, in the same class I am handling the BeginExport event to hide the band[1] column headers.
void
gvExport_BeginExport(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.BeginExportEventArgs e){e.Layout.Bands[1].ColHeadersVisible = false;}
Note that prior to do the export I am not expanding the grid view to show the lower level band - I am simply exporting as is and given that it is supposed to be an WYSIWYG export the results seem counter to that statement. Hopefully this explains my intent a bit better. On that note, are there any samples out there dealing with exportation of grids with multiple bands. Obviously I'd like to follow whatever is recommended for dealing with column headers on export.
Thanks,Paul
Hi,
If you don't want the headers in the Excel sheet to be fixed at the top, then why are you setting the HeaderPlacement to FixedOnTop?
Are you saying you want the headers in the on-screen grid to be on top, but not in the Excel file? If that's the case, handle the ExportStarted event and modify the HeaderPlacement property on the Layout passed into the event.