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

Sort Nodes

#Sort Data Represented as a Tree-Like Structure

The algorithm used to sort hierarchical data differs from the standard method of sorting tabular data. To preserve the tree, nodes are sorted with respect to their nesting levels. First, root nodes are sorted. Then, nodes that reside at the next level are sorted and so on, until the entire hierarchy is sorted.

The image below shows the TreeListView before and after sorting employees by job title in ascending order.

TreeList Sorting Specifics

#Sort Data by Values of Multiple Columns

Data displayed within a TreeListView can be sorted by an unlimited number of columns. The following image shows the TreeListView before and after nodes have been sorted by the values of the second column (‘Full Name’). Only the second column affects the sorting for nodes that have identical values within the first sorting column (‘Job Title’).

treelistsorting2cols

See Also