wpf-devexpress-dot-xpf-dot-grid-dot-treeviewcontrol-dc8a51d8.md
Gets or sets how the TreeViewControl sorts its data. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
[DefaultValue(ColumnSortMode.Default)]
public ColumnSortMode SortMode { get; set; }
<DefaultValue(ColumnSortMode.Default)>
Public Property SortMode As ColumnSortMode
| Type | Default | Description |
|---|---|---|
| ColumnSortMode | Default |
The sort mode.
|
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.
|
The SortMode property specifies the algorithm used to sort TreeViewControl data (by display text, edit value, or a custom sorting algorithm).
The Default option is DisplayText if the TreeViewControl uses in-place editors inherited from the LookUpEditSettingsBase class (ComboBoxEditSettings, LookUpEditSettings). The Default option is Value in other cases.
Follow the steps below to apply custom logic to sort data:
Ascending or Descending.SortMode property to Custom.See Also