Skip to main content

TreeList.MoveNode(TreeListNode, TreeListNode, Boolean) Method

Moves the selected node to the specified node’s child collection.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.1.dll

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

Declaration

public bool MoveNode(
    TreeListNode sourceNode,
    TreeListNode destinationNode,
    bool modifySource
)

Parameters

Name Type Description
sourceNode TreeListNode

A TreeListNode object representing the node to be moved.

destinationNode TreeListNode

A TreeListNode object representing the node to whose child collection the node is moved. null (Nothing in Visual Basic) if the source node must be moved to the root nodes collection.

modifySource Boolean

true, if the parent field value of the source node must be set to the key field value of the destination node; otherwise false.

Returns

Type Description
Boolean

true, if the node has been moved successfully, otherwise false.

Remarks

Use the MoveNode method to move the specified node together with its child nodes to another location.

This can also be performed by end-users using drag-and-drop operations (see TreeListOptionsDragAndDrop.DragNodesMode).

A node cannot be moved to one of its child nodes.

See Also