Back to Devexpress

TreeList.CopyNodes(IEnumerable<TreeListNode>, TreeListNode, Boolean, Int32) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-copynodes-x28-ienumerable-treelistnode-treelistnode-boolean-int32-x29.md

latest4.2 KB
Original Source

TreeList.CopyNodes(IEnumerable<TreeListNode>, TreeListNode, Boolean, Int32) Method

Copies the specified nodes 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.v25.2.dll

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

Declaration

csharp
public List<TreeListNode> CopyNodes(
    IEnumerable<TreeListNode> sourceNodes,
    TreeListNode destinationNode,
    bool cloneChildren,
    int position
)
vb
Public Function CopyNodes(
    sourceNodes As IEnumerable(Of TreeListNode),
    destinationNode As TreeListNode,
    cloneChildren As Boolean,
    position As Integer
) As List(Of TreeListNode)

Parameters

NameTypeDescription
sourceNodesIEnumerable<TreeListNode>

The nodes to copy.

| | destinationNode | TreeListNode |

The target node to which the source node is copied.

| | cloneChildren | Boolean |

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

| | position | Int32 |

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

|

Returns

TypeDescription
List<TreeListNode>

The copies of the original (source) nodes.

|

Remarks

Use the CopyNodes method to create the copies of the specified nodes and insert them at the specified position in the collection of child nodes (Nodes) of another node.

The CopyNodes method does not copy the nodes to another TreeList control.

Use the CopyNode method to copy a node.

Note

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

See Also

CopyNode(TreeListNode, TreeListNode, Boolean, Int32)

MoveNode

DeleteNode(TreeListNode)

AppendNode

How to: Drag XtraGrid rows to the XtraTreeList

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace