TreeListColumn.SortMode Property

Gets or sets how the column’s data is sorted when sorting is applied.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v21.1.dll


public ColumnSortMode SortMode { get; set; }

Property Value

Type Default Description


A ColumnSortMode value specifying how the column’s data is sorted in sort mode.

Available values:

Name Description

Sorts the column’s data according to the type of the editor assigned to the column.

The Default option is equivalent to DisplayText for columns that use LookUpEdit, ImageComboBoxEdit and HypertextLabel (RepositoryItemHypertextLabel) in-place editors.

The Default option is equivalent to Value for other columns. Note that for certain editors (TextEdit, ComboBoxEdit, etc) the edit values match the display values.


Sorts the column’s data by the column’s edit values (these are synchronized with the bound data source’s values).


Sorts the column’s data by the column’s display text (the strings displayed within the column’s cells).


Enables custom sorting of a column’s data. To implement custom sorting, handle the ColumnView.CustomColumnSort event in the GridControl, and the TreeList.CompareNodeValues event in the TreeList.

In the GridControl, the Custom mode also enables custom grouping of rows when grouping is applied against the current column. To implement custom grouping, handle the GridView.CustomColumnGroup event.


The SortMode property determines the algorithm used to sort the column’s data (by display text, edit value or using a custom sorting algorithm). To provide custom sorting, set the SortMode property to ColumnSortMode.Custom and handle the TreeList.CustomColumnSort event.

See Also