Skip to main content
All docs
V23.2

TreeList.CopyNode(TreeListNode, TreeListNode, Boolean, Int32) Method

Copies the specified node to the specified position in the collection of child nodes of another node. Use this method in unbound mode.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v23.2.dll

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

Declaration

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

Parameters

Name Type Description
sourceNode TreeListNode

The node to copy.

destinationNode TreeListNode

The target node to which the source node is copied.

cloneChildren Boolean

true to copy child nodes of the source node; otherwise false.

position Int32

A zero-based integer that specifies the position among the child nodes of the target node to insert the source node.

Returns

Type Description
TreeListNode

A copy of the original (source) node.

Remarks

Use the CopyNode method to create a copy of the specified node and insert it at the specified position in the collection of child nodes (Nodes) of another node.

The CopyNode method does not copy a node to another TreeList control.

Use the CopyNodes method to copy multiple nodes.

Note

The CopyNode method is intended for use in unbound mode. In bound mode, use the AppendNode method.

See Also