Infragistics(R) NetAdvantage(R) Windows Forms
TabNavigation Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : TabNavigation Enumeration

Used to specify how the TAB key is used when navigating the program.

Syntax

Visual Basic (Declaration) 
Public Enum TabNavigation 
   Inherits System.Enum
C# 
public enum TabNavigation : System.Enum 

Members

MemberDescription
NextCell Next Cell. A TAB key will move the focus to the next cell in the grid control.
NextControl Next Control. A TAB key will move the focus to the next control in the form's tab order.
NextControlOnLastCell Next control from the last cell. A TAB key will move the focus to the next control in the form's tab order when the last cell is active, otherwise it will move from cell to cell.

Example

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

Visual BasicCopy Code
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
C#Copy Code
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;

}

See Also