Skip to main content

Commands

A RoutedCommand provides the signaling mechanism that indicates that a particular action is required; it is simply a messaging mechanism and does not perform the actions for the command. Routed commands can be triggered on an element through gestures attached to a command, through an InputBinding on a specific element, or explicitly (invoked directly).

The following table provides a list of the commands that are exposed through the static DataGridCommands class:

CommandDescription
BeginEditRepresents the BeginEdit command, which requests the row enters edit mode. By default, F2.
CancelEditRepresents the CancelEdit command, which requests that row exit edit mode and any changes be discarded. By default, Escape.
CollapseDetailsRepresents the CollapseDetails command, which requests that the associated detail and its possible child details be collapsed. By default, the Left arrow key.
CollapseGroupRepresents the CollapseGroup command, which requests that the associated group be collapsed. By default, the Left arrow key.
EndEditRepresents the EndEdit command, which requests that the row exit edit mode. By default, Enter.
ExpandDetailsRepresents the ExpandDetails command, which requests that the associated detail and its possible child details be expanded. By default, the Right arrow key.
ExpandGroupRepresents the ExpandGroup command, which requests that the associated group be expanded. By default, the Right arrow key.
SelectRowRepresents the SelectRow command, which requests that the DataRow associated with the RowSelector be selected. This command is obsolete and should no longer be used.
ToggleDetailExpansionRepresents the ToggleDetailExpansion command, which requests that the associated detail and its possible child details be collapsed if the root detail is expanded, and expanded if the root detail is collapsed. By default, Space or double-clicking the left mouse button.
ToggleGroupExpansionRepresents the ToggleGroupExpansion command, which requests that the associated group be collapsed if it is expanded, and expanded if it is collapsed. By default, Space or double-clicking the left mouse button.

The following table provides a list of the commands that are exposed by the AutoFilterControl class:

CommandDescription
ClearAutoFilterValuesRepresents the ClearAutoFilterValues command, which requests that the associated column's AutoFilterValues property be cleared.
SelectAllAutoFilterValuesRepresents the SelectAllAutoFilterValues command, which requests that the auto-filter column's AutoFilterValues be set to all values.

The following table provides a list of the commands that are exposed by the ColumnChooserControl class:

CommandDescription
ApplyChangesRepresents the ApplyChanges command, which requests that the last changes be applied.
CancelChangesRepresents the CancelChanges command, which requests that the last changes be cancelled.
HideColumnRepresents the HideColumn command, which requests that the selected column be hidden.
MoveColumnDownRepresents the MoveColumnDown command, which requests that the selected column be moved up.
MoveColumnUpRepresents the MoveColumnUp command, which requests that the selected column be moved down.
ShowColumnRepresents the ShowColumn command, which requests that the selected column be made visible.

The following table provides a list of the commands that are exposed by the GroupNavigationButton class:

CommandDescription
NavigateToGroupRepresents the NavigateToGroup command, which requests that the clicked group header be brought to the top of the viewport.

The following table provides a list of the commands that are exposed by the MergedColumnEditorControl class:

CommandDescription
AddColumnRepresents the AddColumn command, which requests that a new merged column be added.
AddColumnFromListBoxRepresents the AddColumnFromListBox command, which requests that a new merged column be added via the list box.
ApplyChangesRepresents the ApplyChanges command, which requests that the last changes be applied.
CancelChangesRepresents the CancelChanges command, which requests that the last changes be cancelled.
CancelEditFromListBoxRepresents the CancelEditFromListBox command, which requests that the last edit in the list box be cancelled.
MoveColumnDownRepresents the MoveColumnDown command, which requests that the selected column be moved up.
MoveColumnUpRepresents the MoveColumnUp command, which requests that the selected column be moved down.
RemoveColumnRepresents the RemoveColumn command, which requests that the selected merged column be removed.
RemoveColumnFromListBoxRepresents the RemoveColumnFromListBox command, which requests that the selected merged column in the list box be removed.
RenameColumnRepresents the RenameColumn command, which requests that the selected merged column be renamed.
RenameColumnFromListBoxRepresents the RenameColumnFromListBox command, which requests that selected merged column in the list box be renamed.
ShowHideColumnRepresents the ShowHideColumn command, which requests that the selected column's visibility be toggled.
ShowHideColumnFromListBoxRepresents the ShowHideColumnFromListBox command, which requests that the visibility of the selected column in the list box be toggled.

The following table provides a list of the commands that are exposed by the SearchControl class:

CommandDescription
ClearSearchRepresents the ClearSearch command, which requests that the content of the search textbox be cleared.
NextRepresents the Next command, which requests that the focus moves to the next valid search result, if any.
PreviousRepresents the Previous command, which requests that the focus moves to the previous valid search result, if any.