Skip to main content

ColumnBase.SortMode Property

Gets or sets how the column’s data is sorted when sorting is applied to it. This is a dependency property.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(ColumnSortMode.Default, Handler = "OnDataPropertyChanged")]
public ColumnSortMode SortMode { get; set; }

Property Value

Type
ColumnSortMode

Available values:

Name Description
Default

The actual sort mode is determined by a control. See the property description for more details.

Value

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

DisplayText

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

Custom

Applies sort options specified in the CustomColumnSort event handler.

In data grids, this mode also applies group options from the CustomColumnGroup event handler.

Remarks

The SortMode property specifies 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 ‘Custom’ and handle the GridControl.CustomColumnSort event.

See Also