Skip to main content
All docs
V25.1
  • TreeListEnterKeyDirection 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 TreeListEnterKeyDirection

    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.

    Related API Members

    The following properties accept/return TreeListEnterKeyDirection values:

    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.

    <DxTreeList @ref="TreeList"
                Data="DataSource"
                KeyFieldName="Id"
                ParentKeyFieldName="ParentId"
                HasChildrenFieldName="HasChildren"
                EditMode="TreeListEditMode.EditCell"
                EnterKeyDirection="TreeListEnterKeyDirection.Column">
        <Columns>
            *@* ... *@
        </Columns>
    </DxTreeList>
    

    Move Focus on Enter

    Run Demo: Edit Cell

    Note

    When EnterKeyDirection is TreeListEnterKeyDirection.Column, focus advances to the next visible cell.
    Collapsed rows are not expanded. Focus moves to the next visible row.

    User Input Validation

    In EditCell mode, the TreeList 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