SpreadsheetSelectionBehaviorOptions.MoveActiveCellMode Property
Specifies the direction in which an active cell moves on pressing the ENTER key. This is a dependency property.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.1.dll
NuGet Package: DevExpress.Wpf.Spreadsheet
Declaration
Property Value
Type | Description |
---|---|
MoveActiveCellModeOnEnterPress | A MoveActiveCellModeOnEnterPress enumeration value. |
Available values:
Name | Description |
---|---|
None | An active cell does not move on an ENTER or a SHIFT+ENTER press. |
Down | An active cell moves one cell down on an ENTER press, and one cell up on a SHIFT+ENTER press. |
Right | An active cell moves one cell to the right on an ENTER press, and one cell to the left on a SHIFT+ENTER press. |
Up | An active cell moves one cell up on an ENTER press, and one cell down on a SHIFT+ENTER press. |
Left | An active cell moves one cell to the left on an ENTER press, and one cell to the right on a SHIFT+ENTER press. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to MoveActiveCellMode |
---|---|
SpreadsheetBehaviorOptions |
|
Remarks
By default, when the ENTER key is pressed, the SpreadsheetControl moves an active cell one cell down. Use the MoveActiveCellMode property to set another direction to move an active cell (for example, Up, Right or Left). To keep an active cell on pressing ENTER, set the MoveActiveCellMode property to MoveActiveCellModeOnEnterPress.None.
The SHIFT+ENTER key combination moves an active cell in the opposite direction of what the MoveActiveCellMode property specifies.
TAB and SHIFT+TAB moves an active cell one cell to the right and to the left respectively, and this behavior is not customized.
Note
If a cell range or multiple ranges are selected in a worksheet, ENTER, SHIFT+ENTER, TAB and SHIFT+TAB move an active cell within this selection only.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MoveActiveCellMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.