Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles ultraGrid1.InitializeLayout
' InitializeLayout gets fired for the UltraGrid's layout as well as when printing.
If e.Layout.IsPrintLayout Then
' This is a print layout. When printing, use White as the background color.
e.Layout.Appearance.BackColor = Color.White
' Hide the second band (band 1) when printing so rows from that band and its
' descendant bands don't show up in the print.
e.Layout.Bands(1).Hidden = True
Else
e.Layout.Appearance.BackColor = Color.Gray
End If
' Set the behaviour of tab keys in the UltraGrid.
Me.UltraGrid1.DisplayLayout.TabNavigation = TabNavigation.NextCell
End Sub