Skip to main content

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