Skip to main content

How to: Traverse through sort columns

The following sample code uses the TreeList.GetSortColumn method and the TreeList.SortedColumnCount property to traverse through columns involved in sorting.

using DevExpress.XtraTreeList.Columns;
// ...
for(int i = 0; i < treeList1.SortedColumnCount; i++) {
   TreeListColumn sortedColumn = treeList1.GetSortColumn(i);
   // perform desired operations on a sorted column here
   //...
}