Version

TabNavigation Property

Returns or sets a value that indicates how the control will respond when the TAB key is pressed.
Syntax
'Declaration
 
Public Property TabNavigation As TabNavigation
public TabNavigation TabNavigation {get; set;}
Remarks

When this property is set to 0 (TabNavigationNextCell) and a cell has focus, pressing TAB will give focus to the cell to the right, or the first cell in the row below the active row if the active cell is the rightmost cell in the row. If a row has focus, pressing TAB will give focus to the row below the active row, unless the active row is the last row in the control, in which case the next control in the form's tab order will receive focus.

When this property is set to 1 (TabNavigationNextControl) the control passes focus from itself to the next control in the tab order when the TAB key is pressed.

The 2 (TabNavigationNextControlOnLastCell) combines these two kinds of functionality. The TAB key will shift focus to the next control on the form only when the last cell in the grid has focus, otherwise it will move between cells. (Similarly, when the first cell in the grid has focus, pressing SHIFT+TAB will shift focus to the previous control on the form.)

Use the TabStop property of a cell or column to determine whether an individual cell or the cells in a column should receive focus when the user presses the TAB key.

Example
Following code shows some of the information available in InitializeLayout event.

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
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{

	// InitializeLayout gets fired for the UltraGrid's layout as well as when printing.
	if ( e.Layout.IsPrintLayout )
	{
		// 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;
	}		

	// Set the behaviour of tab keys in the UltraGrid.
	this.ultraGrid1.DisplayLayout.TabNavigation = TabNavigation.NextCell;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also