Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

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

#Declaration

public bool MoveNodes(
    IEnumerable<TreeListNode> sourceNodes,
    TreeListNode destinationNode,
    bool modifySource,
    int position
)

#Parameters

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.

#Returns

Type Description
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