Skip to main content
All docs
V25.1
  • GridEnterKeyDirection Enum

    Lists values that specify where focus moves after a user presses Enter.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public enum GridEnterKeyDirection

    Members

    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.

    Remarks

    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>
    

    Move Focus on Enter

    Run Demo: Edit Cell

    User Input Validation

    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