Back to Devexpress

TreeList.MoveNode(TreeListNode, TreeListNode, Boolean) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-movenode-x28-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-system-dot-boolean-x29.md

latest3.0 KB
Original Source

TreeList.MoveNode(TreeListNode, TreeListNode, Boolean) Method

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

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public bool MoveNode(
    TreeListNode sourceNode,
    TreeListNode destinationNode,
    bool modifySource
)
vb
Public Function MoveNode(
    sourceNode As TreeListNode,
    destinationNode As TreeListNode,
    modifySource As Boolean
) As Boolean

Parameters

NameTypeDescription
sourceNodeTreeListNode

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

TypeDescription
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

AppendNode

CopyNode

DeleteNode(TreeListNode)

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace