KeyActionMappingsBase Class

An abtract collection class of KeyActionMappingBase objects.
Public MustInherit Class KeyActionMappingsBase 
   Inherits Infragistics.Shared.DisposableObjectCollectionBase
public abstract class KeyActionMappingsBase : Infragistics.Shared.DisposableObjectCollectionBase 
This sample shows how to map the W and Z keys to move selection between rows of a grid. It checks to see if a key is mapped, then maps it to the specified key.

Imports Infragistics.Win

Private Sub SetKeyMappings()
      ' Maps the W and Z keys to traverse the grid up and down when not in edit mode.
      If Not Me.UltraGrid1.KeyActionMappings.IsKeyMapped(Keys.Z, 0) Then
          Dim kaDown As UltraWinGrid.GridKeyActionMapping = New UltraWinGrid.GridKeyActionMapping(Keys.Z, Infragistics.Win.UltraWinGrid.UltraGridAction.NextRow, Infragistics.Win.UltraWinGrid.UltraGridState.InEdit, 0, 0, 0)

      End If

      If Not Me.UltraGrid1.KeyActionMappings.IsKeyMapped(Keys.W, 0) Then
          Dim kaUp As UltraWinGrid.GridKeyActionMapping = New UltraWinGrid.GridKeyActionMapping(Keys.W, Infragistics.Win.UltraWinGrid.UltraGridAction.PrevRow, Infragistics.Win.UltraWinGrid.UltraGridState.InEdit, 0, 0, 0)

      End If

  End Sub
using Infragistics.Win;

private void SetKeyMappings()

	// Maps the W and Z keys to traverse the grid up and down when not in edit mode.
	if (!this.ultraGrid1.KeyActionMappings.IsKeyMapped(Keys.Z,0))
		UltraWinGrid.GridKeyActionMapping kaDown = new UltraWinGrid.GridKeyActionMapping(Keys.Z,Infragistics.Win.UltraWinGrid.UltraGridAction.NextRow,Infragistics.Win.UltraWinGrid.UltraGridState.InEdit  ,0,0,0);


	if (!this.ultraGrid1.KeyActionMappings.IsKeyMapped(Keys.W,0))
		UltraWinGrid.GridKeyActionMapping kaUp = new UltraWinGrid.GridKeyActionMapping(Keys.W,Infragistics.Win.UltraWinGrid.UltraGridAction.PrevRow,Infragistics.Win.UltraWinGrid.UltraGridState.InEdit ,0,0,0);



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