DxTreeList.EditNextCellOnEnter Property
In EditCell mode, specifies whether the TreeList starts editing the next cell after a user presses Enter.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.Grid.v26.1.dll
Declaration
[DefaultValue(false)]
[Parameter]
public bool EditNextCellOnEnter { get; set; }
Property Value
| Type | Default | Description |
|---|---|---|
| Boolean | false |
|
Remarks
The TreeList component supports several keyboard shortcuts that speed up navigation and editing. When a user focuses a cell and presses Enter, an in-place editor opens, where the user can modify cell content. If an in-place editor is already open, Enter applies changes and closes the editor.
If the EnterKeyDirection property value is Column/Row, focus moves to another cell. Use the EditNextCellOnEnter property to specify whether the TreeList opens an in-place editor in the next cell.
Note
To use the Enter key in TreeList, set EditMode to TreeListEditMode.EditCell.
<DxTreeList @ref="TreeList"
Data="DataSource"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
HasChildrenFieldName="HasChildren"
EditMode="TreeListEditMode.EditCell"
EnterKeyDirection="TreeListEnterKeyDirection.Column"
EditNextCellOnEnter="true">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task"/>
<DxTreeListDataColumn FieldName="StartDate" Width="120px"/>
<DxTreeListDataColumn FieldName="DueDate" Width="120px"/>
<DxTreeListDataColumn FieldName="Priority"
Width="80px"
CaptionAlignment="TreeListTextAlignment.Center"
TextAlignment="TreeListTextAlignment.Center">
<CellDisplayTemplate>
@{
var displayText = EmployeeTask.TaskPriorityToString((int)context.GetRowValue("Priority"));
}
<span title="@displayText priority">@displayText</span>
</CellDisplayTemplate>
</DxTreeListDataColumn>
<DxTreeListDataColumn Caption="Progress"
FieldName="Status"
Width="100px"
CaptionAlignment="TreeListTextAlignment.Center"
TextAlignment="TreeListTextAlignment.Center">
<CellDisplayTemplate>
<DxProgressBar Value="Convert.ToDouble(context.Value)"
MinValue="0"
MaxValue="100"
Thickness="0.875em"
Size="100%"
ShowLabel="false"/>
</CellDisplayTemplate>
</DxTreeListDataColumn>
<DxTreeListCommandColumn Width="90px" />
</Columns>
</DxTreeList>

Tip
Shift+Enter moves focus in the opposite direction.
Enable EditOnKeyPress to make data entry smoother and faster. This option activates the focused cell editor when the user starts typing, without an extra click or key press.