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.v20.1.dll


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


Name Type Description
sourceNodes IEnumerable<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.


Type Description

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


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