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

TreeList.CopyNode(TreeListNode, TreeListNode, Boolean) Method

Copies the specified node to the specified node’s child collection.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.1.dll

Declaration

public TreeListNode CopyNode(
    TreeListNode sourceNode,
    TreeListNode destinationNode,
    bool cloneChildren
)

Parameters

Name Type Description
sourceNode TreeListNode

A TreeListNode object representing the node to be copied.

destinationNode TreeListNode

A TreeListNode object representing the node to whose child collection the node is copied.

cloneChildren Boolean

true if child nodes of the node being copied must be cloned; otherwise false.

Returns

Type Description
TreeListNode

A TreeListNode object representing the copy of the specified node.

Remarks

Use the CopyNode method to create a copy of the specified node. The copy is added to the child collection of the destination node. Note that a node cannot be copied to another TreeList control. Also note that children of the copied node are not cloned if the node is copied to itself or its own child even if the cloneChildren parameter is set to true.

See Also