TreeList.SetNodeIndex(TreeListNode, Int32) Method
Moves the specified node to a new position within its parent node’s child collection.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v24.2.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
#Declaration
public void SetNodeIndex(
TreeListNode node,
int index
)
#Parameters
Name | Type | Description |
---|---|---|
node | Tree |
A Tree |
index | Int32 | An integer value representing the destination position of the node within its parent node’s child collection. |
#Remarks
Use the SetNodeIndex method to move the node within the collection of nodes that have the same parent. The destination position of the node is specified by the index parameter. If this parameter value is negative or greater than the number of nodes in the collection, the node is moved to the first or to the last position within the collection respectively.
Note, that calling this method may not actually move the node if sorting is applied to the Tree List control.
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetNodeIndex(TreeListNode, Int32) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.