Skip to main content
A newer version of this page is available. .

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

Declaration

public void SetNodeIndex(
    TreeListNode node,
    int index
)

Parameters

Name Type Description
node TreeListNode

A TreeListNode object representing the node to be moved.

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.

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

See Also