blazor-devexpress-dot-blazor-24bed4c4.md
Lists values that specify where focus moves after a user presses Enter.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public enum GridEnterKeyDirection
| Name | Description |
|---|---|
None |
Validate the cell value and close the in-place editor. The current cell remains focused.
|
| Column |
Enter and Shift+Enter move focus one cell down or up in the same column.
|
| Row |
Enter and Shift+Enter move focus one cell right or left in the same row. Focus can move to the next/previous row if the current cell is last/first.
|
The following properties accept/return GridEnterKeyDirection values:
| Library | Related API Members |
|---|---|
| Blazor | DxGrid.EnterKeyDirection |
| IGrid.EnterKeyDirection | |
| XAF: Cross-Platform .NET App UI & Web API | DxGridModel.EnterKeyDirection |
The EnterKeyDirection property specifies where focus moves after a user presses Enter or Shift+Enter to close the in-place editor.
If the editor is on the last row and GridEnterKeyDirection is Column, Enter will keep the focus on the current cell.
<DxGrid @ref="Grid"
Data="DataSource"
KeyFieldName="EmployeeId"
EditMode="GridEditMode.EditCell"
EnterKeyDirection="GridEnterKeyDirection.Column">
<Columns>
*@* ... *@
</Columns>
</DxGrid>
In EditCell mode, the Grid component validates cell values once the edited row loses focus. Validation behavior on Enter / Shift+Enter depends on the EnterKeyDirection value:
Column: Validation occurs immediately when you press the key.Row: Validation occurs after you edit the last cell in the row and press the key. The component prevents users from editing another row until they address all validation errors.See Also