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 |
---|---|---|
source |
IEnumerable<Tree |
The moved Tree |
destination |
Tree |
A Tree |
modify |
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 source |
#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.