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.v24.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 |
---|---|---|
source |
Tree |
The node to copy. |
destination |
Tree |
The target node to which the source node is copied. |
clone |
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 |
---|---|
Tree |
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 Copy
method is intended for use in unbound mode. In bound mode, use the Append