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.Sort(TreeListNode, IComparer<TreeListNode>, Boolean) Method

Sorts the specified node’s children using the specified IComparer object. Allows you to sort root nodes.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public void Sort(
    TreeListNode node,
    IComparer<TreeListNode> comparer,
    bool recursive = false
)

#Parameters

Name Type Description
node TreeListNode

The node whose children need to be sorted. Null, to sort root nodes.

comparer IComparer<TreeListNode>

The object that compares Tree List nodes.

#Optional Parameters

Name Type Default Description
recursive Boolean False

true, to sort nodes recursively; otherwise, false.

#Remarks

See TreeList.Sort for more information.

See Also