Version

UltraGridAction Enumeration

Enumerates the possible actions that can be performed on the grid
Syntax
'Declaration
 
Public Enum UltraGridAction 
   Inherits System.Enum
public enum UltraGridAction : System.Enum 
Members
MemberDescription
AboveCellActivates the previous visible cell in the grid above the ActiveCell. This action will span islands of data, but not bands, so the new ActiveCell will always be in the same band as the prior ActiveCell, but it may be in a row under a different parent row. This action will fail if there is no ActiveCell. If the ActiveCell is currently in edit mode, this action will attempt to exit edit mode before changing the active cell.
AboveRowActivates the previous visible row in the grid above the ActiveRow. This action will span islands of data, but not bands, so the new ActiveRow will always be in the same band as the prior ActiveRow, but it may be under a different parent row. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To span across bands, use the PrevRow action.
ActivateCellActivates the first visible cell in the ActiveRow. This action will fail if there is no active row, or if there is already an ActiveCell.
BelowCellActivates the next visible cell in the grid below the ActiveCell. This action will span islands of data, but not bands, so the new ActiveCell will always be in the same band as the prior ActiveCell, but it may be in a row under a different parent row. This action will fail if there is no ActiveCell. If the ActiveCell is currently in edit mode, this action will attempt to exit edit mode before changing the active cell.
BelowRowActivates the next visible row in the grid below the ActiveRow. This action will span islands of data, but not bands, so the new ActiveRow will always be in the same band as the prior ActiveRow, but it may be under a different parent row. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To span across bands, use the NextRow action, instead.
CancelHeaderAction for edit mode on a header and discarding the changes.
CloseDropdownCloses the dropdown in the ActiveCell. This action will fail if there is no ActiveCell, the ActiveCell has no dropdown, or the dropdown is not currently dropped down.
CollapseRowCollapses the active row. This action will fail if the row is already collapsed.
CommitHeaderAction for edit mode on a header and committing the changes.
CommitRowWhen the active row is a filter row, this action evaluates the filter values input into a filter row. When the active row is an add-row, commits the add-row if it has been modified by the user. Otherwise it commits the active row.
CopyCopies the selected cells to the clipboard. This action will fail if the UltraGridOverride.AllowMultiCellOperations property does not allow Copying.
CutCopies the selected cells to the clipboard and deletes the contents of the cells. This action will fail if the UltraGridOverride.AllowMultiCellOperations property does not allow Cutting.
DeactivateCellDeactivates the ActiveCell. This action will fail if there is no ActiveCell.
DeleteCellsDeletes the contents of the selected cells. This action will fail if the UltraGridOverride.AllowMultiCellOperations property does not allow Deleting.
DeleteRowsDeletes the currently selected rows. Like all UltraGridActions, this action simulates user input, which means it will display a confirmation dialog to the user by default. To cancel the confirmation dialog, set e.DisplayPromptMsg to false in the BeforeRowsDeleted event. Or use the UltraGrid.DeleteSelectedRows method, instead of an action.
EnterEditModeCauses the ActiveCell to enter edit mode. This action will fail if there is no ActiveCell. If the grid does not have focus, it will attempt to take focus. If it fails to take focus, the action will fail.
EnterEditModeAndDropdownCauses the ActiveCell to enter edit mode and drop down it's DropDown. This action will fail if there is no ActiveCell or if the ActiveCell has no dropdown. If the grid does not have focus, it will attempt to take focus. If it fails to take focus, the action will fail.
ExitEditModeExist edit mode on the ActiveCell. This action will fail if there is no ActiveCell of if the ActiveCell is not in edit mode.
ExpandRowExpands the active row. This action will fail if the row is already expanded.
FirstCellInBandActivates the first cell in the current island of data (the first visible cell in the first visible row of the island). This action will fail if there is no Activecell or the ActiveCell is not in the first visible column.
FirstCellInGridActivates the first visible cell in the grid (this first visible cell in the first visible row of the root band).
FirstCellInRowActivates the first visible cell in the ActiveRow.
FirstRowInBandActivates the first visible row in the current island of data. This action will fail if there is no ActiveRow.
FirstRowInGridActivates the first visible row in the grid. This action will fail if there is no ActiveRow in the grid.
LastCellInBandActivates the last cell in the current island of data (the last visible cell in the last visible row of the island). This action will fail if there is no Activecell or the ActiveCell is not in the last visible column.
LastCellInGridActivates the last visible cell in the grid (this last visible cell in the last visible row of the grid).
LastCellInRowActivates the last visible cell in the ActiveRow.
LastRowInBandActivates the last visible row in the current island of data. This action will fail if there is no ActiveRow.
LastRowInGridActivates the last visible row in the grid. This action will fail if there is no ActiveRow in the grid.
NextCellActivates the next visible cell following the ActiveCell. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows and bands, so it may activate a cell in the next row or a row in a child band. This action will not place the new ActiveCell into edit mode. To move to the next cell and enter edit mode, use the NextCellByTab action, instead.
NextCellByTabActivates the next visible cell following the ActiveCell and puts it into edit mode. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows and bands, so it may activate a cell in the next row or a row in a child band. To move to the next cell without entering edit mode, use the NextCell action, instead.
NextCellInBandActivates the next visible cell following the ActiveCell. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows, but not bands, so it may activate a cell in the next row, but will never leave the current island of data.
NextRegionSets focus to the ActiveCell in the next ColScrollRegion or RowScrollRegion. This action will fail if there is no ActiveCell, if the ActiveCell is in edit mode or if there is no ColScrollRegion or RowScrollRegion to put focus on.
NextRowActivates the next visible row in the grid after the ActiveRow. This action will span bands, so if the ActiveRow is expanded and has visible child rows, the first child row will be activated. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To prevent spanning across bands, use the BelowRow action, instead.
NextRowByTabActivates the next visible row in the grid after the ActiveRow. This action will span bands, so if the ActiveRow is expanded and has visible child rows, the first child row will be activated. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To prevent spanning across bands, use the BelowRow action, instead. NextRowByTab differs from NextRow in that it will not add to the existing selection, even if the Control and/or Shift parameters are specified true.
PageDownCellActivates a visible cell that is one page down from the ActiveCell. This action will fail if there is no ActiveCell in the grid. This action will span islands of data, but will not span bands. This means the new ActiveCell will always be a cell in the same band as the prior ActiveCell, but may be under a different parent row.
PageDownRowActivates a visible row that is one page down from the ActiveRow. This action will span islands of data, but will not span bands. This means the new ActiveRow will always be a row in the same band as the prior ActiveRow, but may be under a different parent row.
PageUpCellActivates a visible cell that is one page up from the ActiveCell. This action will fail if there is no ActiveCell in the grid. This action will span islands of data, but will not span bands. This means the new ActiveCell will always be a cell in the same band as the prior ActiveCell, but may be under a different parent row.
PageUpRowActivates a visible row that is one page up from the ActiveRow. This action will span islands of data, but will not span bands. This means the new ActiveRow will always be a row in the same band as the prior ActiveRow, but may be under a different parent row.
PastePastes cells from the clipboard to the selected cells in the grid. This action will fail if the UltraGridOverride.AllowMultiCellOperations property does not allow Pasting.
PrevCellActivates the previous visible cell relative to the ActiveCell. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows and bands, so it may activate a cell in the previous row or a row in a sibling or parent band. This action will not place the new ActiveCell into edit mode. To move to the previous cell and enter edit mode, use the NextCellByTab action, instead.
PrevCellByTabActivates the previous visible cell relative to the ActiveCell and puts it into edit mode. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows and bands, so it may activate a cell in the previous row or a row in a sibling or parent band. This action will not place the new ActiveCell into edit mode. To move to the previous cell without entering edit mode, use the NextCell action, instead.
PrevCellInBandActivates the previous visible cell relative to the ActiveCell. If the ActiveCell is in edit mode, this action will attempt to exit edit mode. If exiting edit mode fails, the action will fail. This action will span rows, but not bands, so it may activate a cell in the previous row, but will never leave the current island of data.
PrevRegionSets focus to the ActiveCell in the previous ColScrollRegion or RowScrollRegion. This action will fail if there is no ActiveCell, if the ActiveCell is in edit mode or if there is no ColScrollRegion or RowScrollRegion to put focus on.
PrevRowActivates the previous visible row in the grid before the ActiveRow. This action will span bands, so if the ActiveRow is the first row in an island, it's parent row (or the last row in a sibling island) will be activated. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To prevent spanning across bands, use the AboveRow action, instead.
PrevRowByTabActivates the previous visible row in the grid before the ActiveRow. This action will span bands, so if the previous row is expanded and has visible child rows, the last descendant row will be activated. If a cell is currently in edit mode, this action will attempt to exit edit mode before changing the active row. To prevent spanning across bands, use the AboveRow action, instead. PrevRowByTab differs from PrevRow in that it will not add to the existing selection, even if the Control and/or Shift parameters are specified true.
RedoAction for redoing the last undo operation.
ToggleCellSelToggles the Selected state of the ActiveCell. This action will fail if there is no ActiveCell or if the ActiveCell is in edit mode. It also has no affect when the SelectTypeCell is set to "Single".
ToggleCheckboxToggles the state of the CheckBox or TriStateCheckBox in the ActiveCell. This action will fail if there is no ActiveCell or if the ActiveCell is not a CheckBox or TriStateCheckBox.
ToggleDropdownToggles the drop down in the current ActiveCell. This method will fail if the ActiveCell has no dropdown, the grid does not have focus, or the ActiveCell is not in edit mode.
ToggleEditModeToggles edit mode on the current cell. This action will cause the ActiveCell to enter or exit edit mode. The action will fail if there is no active cell. If a cell enters edit mode while the grid does not have focus, the grid will attempt to take focus before entering edit mode. If it fails to take focus, the action will fail.
ToggleRowSelToggles the Selected state of the ActiveRow. This action will fail if there is no ActiveRow or if there is an ActiveCell.
UndoAction for undoing the last multi-cell cut or paste operation.
UndoCellCancels any pending edits in the ActiveCell. This action will revert the ActiveCell to the value from the underlying DataSource and cancel any pending changes made by the user. The action will fail if there is no ActiveCell, of the ActiveCell is not in edit mode. This action will also cause the ActiveCell to exit edit mode.
UndoRowCancels any pendits edits in the ActiveRow. This action will revert all cells in the ActiveRow to the value from the underlying DataSource, discarding any pending changes made by the user. The action will fail if there is no ActiveRow or if a cell is in edit mode.
Example
The following code illustrates how to add a custom key/action mapping to the grid that will navigate to the first row in the grid when the grid has focus but is not in edit mode and the users presses the ‘H’ key (unless the ‘alt’ key is also pressed).

Imports Infragistics.Win.UltraWinGrid

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

     Dim newMapping As GridKeyActionMapping

    ' Add a custom key/action mapping to the grid that 
    ' will navigate to the first row in the grid when 
    ' the grid has focus but is not in edit mode 
    ' and the users presses the ‘H’ key (unless the
    ' 'alt’ key is also pressed). 
    newMapping = New GridKeyActionMapping(Keys.H, UltraGridAction.FirstRowInGrid, UltraGridState.InEdit, 0, Infragistics.Win.SpecialKeys.Alt, 0)

    Me.ultraGrid1.KeyActionMappings.Add(newMapping)

    ' Note: The concept applies to UltraCombo controls as
    ' well except that the combo's KeyActionMappings is
    ' a collection of a mapping class, and associated
    ' state and actiion flags, that make sense for a combo
    ' (i.e. ComboKeyActionMapping, UltraComboAction and
    ' UltraComboState.

End Sub
using Infragistics.Win.UltraWinGrid;

private void Form1_Load(object sender, System.EventArgs e)
{

	this.oleDbDataAdapter1.Fill( this.dataSet11 );

	// Add a custom key/action mapping to the grid that 
	// will navigate to the first row in the grid when 
	// the grid has focus but is not in edit mode 
	// and the users presses the ‘H’ key (unless the
	// 'alt’ key is also pressed). 
	this.ultraGrid1.KeyActionMappings.Add( 
		new GridKeyActionMapping( 
			// the key code
			Keys.H,
			// the action to take
			UltraGridAction.FirstRowInGrid,
			// disallowed state
			UltraGridState.InEdit, 
			// required state (none)
			0, 
			// disallowed special keys
			Infragistics.Win.SpecialKeys.Alt, 
			// required special keys (none)
			0 ) );

	// Note: The concept applies to UltraCombo controls as
	// well except that the combo's KeyActionMappings is
	// a collection of a mapping class, and associated
	// state and actiion flags, that make sense for a combo
	// (i.e. ComboKeyActionMapping, UltraComboAction and
	// UltraComboState.

}
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