Skip to main content
A newer version of this page is available. .

TreeListOptionsDragAndDrop.DragNodesMode Property

Gets or sets whether single or multiple nodes can be dragged simultaneously, or whether the drag-and-drop functionality is disabled.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.2.dll

Declaration

[DefaultValue(DragNodesMode.None)]
[XtraSerializableProperty]
public virtual DragNodesMode DragNodesMode { get; set; }

Property Value

Type Default Description
DevExpress.XtraTreeList.DragNodesMode **None**

Nodes drag-and-drop mode.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to DragNodesMode
WinForms Controls GanttControl
.OptionsDragAndDrop.DragNodesMode
ResourcesTree
.OptionsDragAndDrop.DragNodesMode
TreeList
.OptionsDragAndDrop.DragNodesMode
Reporting XRDesignFieldList
.OptionsDragAndDrop.DragNodesMode
XRDesignReportExplorer
.OptionsDragAndDrop.DragNodesMode

Remarks

If the DragNodesMode property is set to None, node drag-and-drop is disabled in the current Tree List control. Set the DragNodesMode property to Single or Multiple to enable single or multiple node drag-and-drop. When activating multiple node drag-and-drop, ensure that multiple node selection is enabled (see TreeListOptionsSelection.MultiSelect).

To insert a node prior to another node, by default, an end-user needs to hold the SHIFT key down while dragging. If the TreeListOptionsDragAndDrop.DropNodesMode property is set to Advanced, the SHIFT key needn’t be pressed. To insert a node above another node, an end-user should hover the dragged node over the upper half of the target node. When dragging-and-dropping over the lower half of the target node, the dragged node will be inserted as a child of the target node.

To copy the dragged node (instead of a move operation), hold the CTRL key down. Nodes can be copied only if the TreeListOptionsDragAndDrop.CanCloneNodesOnDrop option is set to true.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DragNodesMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also