Back to Devexpress

TreeListOptionsDragAndDrop.DragNodesMode Property

windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsdraganddrop.md

latest3.5 KB
Original Source

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.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue(DragNodesMode.None)]
[XtraSerializableProperty]
public virtual DragNodesMode DragNodesMode { get; set; }
vb
<DefaultValue(DragNodesMode.None)>
<XtraSerializableProperty>
Public Overridable Property DragNodesMode As DragNodesMode

Property Value

TypeDefaultDescription
DevExpress.XtraTreeList.DragNodesModeNone

Nodes drag-and-drop mode.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to DragNodesMode
TreeList

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

See Also

MultiSelect

DropNodesMode

CanCloneNodesOnDrop

BeforeDragNode

AfterDragNode

DragCancelNode

TreeListOptionsDragAndDrop Class

TreeListOptionsDragAndDrop Members

DevExpress.XtraTreeList Namespace