ColumnSortMode Enum
Lists the values that specify how a column’s data should be sorted.
Namespace: DevExpress.XtraGrid
Assembly: DevExpress.Data.v18.1.dll
Declaration
Members
Name | Description |
---|---|
Default
|
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. |
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
|
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. |
Related API Members
The following properties accept/return ColumnSortMode values:
Library | Related API Members |
---|---|
WinForms Controls | GridColumn.SortMode |
TreeListColumn.SortMode | |
WPF Controls | ColumnBase.SortMode |
ASP.NET Web Forms Controls | ASPxGridBehaviorSettings.SortMode |
GridDataColumnSettings.SortMode |
Remarks
Use the following properties to specify how a column’s data is sorted when sorting is applied:
- For columns in the GridControl, use the GridColumn.SortMode property.
- For columns in the TreeList, use the TreeListColumn.SortMode property.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnSortMode enum.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.