Back to Devexpress

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

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

latest3.4 KB
Original Source

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

Moves the TreeListNode objects specified via the sourceNodes parameter to the TreeListNode.Nodes collection of the TreeListNode specified by the destinationNode parameter.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

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

Parameters

NameTypeDescription
sourceNodesIEnumerable<TreeListNode>

The moved TreeListNode objects.

| | destinationNode | TreeListNode |

A TreeListNode accepting the moved one.

| | modifySource | Boolean |

true if the destination node’s key field value is assigned to the parent field of the source node; otherwise, false.

| | position | Int32 |

An Int32 value that specifies the position that the moved node occupies within the destination collection.

|

Returns

TypeDescription
Boolean

true , if the sourceNode was moved, otherwise, false.

|

Remarks

If the destinationNode parameter value is null , the sourceNodes is moved to the root of the TreeList. Nodes cannot be moved if:

  • the sourceNodes parameter value is null ;
  • a node in the sourceNodes and the destinationNode parameters represent the same TreeListNode;
  • the destinationNode is a child node of a node in the sourceNodes.

See Also

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace