Back to Devexpress

TreeListEnterKeyDirection Enum

blazor-devexpress-dot-blazor-59133aaf.md

latest2.7 KB
Original Source

TreeListEnterKeyDirection Enum

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

Declaration

csharp
public enum TreeListEnterKeyDirection

Members

NameDescription
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 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.

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

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

DevExpress.Blazor Namespace