TreeViewControl.EditorShowMode Property
Gets or sets the node editor activation mode. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v26.1.dll
Declaration
Property Value
| Type | Description |
|---|---|
| EditorShowMode | An EditorShowMode enumeration value that specifies the active editor activation mode. |
Available values:
| Name | Description |
|---|---|
| Default | Specifies the default behavior. For the GridControl, this option acts as the EditorShowMode.MouseDown option. If the grid functions in marquee selection mode or the multiple cell selection is enabled, this option acts as the EditorShowMode.MouseUpFocused. |
| MouseDown | A cell’s in-place editor is activated when the left mouse button is pressed. |
| MouseDownFocused | If a cell is focused and not being edited, an in-place editor is opened on pressing the mouse button. Clicking a non-focused cell focuses the cell first, and a subsequent mouse-down event activates the in-place editor (if not prohibited). |
| MouseUp | A cell’s in-place editor is activated when a mouse button is released from a click within the cell. |
| MouseUpFocused | If a cell is focused and not being edited, an in-place editor is opened on a click (the mouse button is pressed and then released). Clicking a non-focused cell focuses the cell first, and a subsequent click activates the in-place editor (if not prohibited). |
Remarks
If you enable the ShowSelectionRectangle property and set the EditorShowMode property to EditorShowMode.Default, the TreeViewControl displays an editor only for the focused node. A user must click a node to focus it and click again to activate the editor.
Example: Activate an Editor on Mouse Click
The following example activates a node editor on a single mouse click:
<dx:ThemedWindow x:Class="TreeViewControlApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Title="TreeViewControl Demo" Height="450" Width="600">
<dxg:TreeViewControl x:Name="tree"
ChildNodesPath="Employees"
TreeViewFieldName="Name"
AllowEditing="True"
EditorShowMode="MouseUpFocused"/>
</dx:ThemedWindow>