Private Sub MyGridExporter_HeaderRowExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.HeaderRowExportingEventArgs) Handles MyGridExporter.HeaderRowExporting
If e.HeaderType = HeaderTypes.BandHeader Then
e.Band.Header.Appearance.BackColor = Color.LightBlue
End If
End Sub
Private Sub MyGridExporter_HeaderRowExported(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.HeaderRowExportedEventArgs) Handles MyGridExporter.HeaderRowExported
' CurrentRowIndex is incremented after the row is exported
Dim tmRow As WorksheetRow
tmRow = e.CurrentWorksheet.Rows(e.CurrentRowIndex - 1)
If Not tmRow.Cells(e.CurrentColumnIndex).AssociatedMergedCellsRegion Is Nothing Then
' band header is exported as merged region
tmRow.Cells(e.CurrentColumnIndex).CellFormat.Rotation = 45
Else
' column headers are exported as normal cells
tmRow.CellFormat.Rotation = 45
End If
tmRow.Height = 65 * 20
End Sub