Back to Devexpress

PropertyGridControl.SortMode Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-de30da04.md

latest2.3 KB
Original Source

PropertyGridControl.SortMode Property

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

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public PropertyGridSortMode SortMode { get; set; }
vb
Public Property SortMode As PropertyGridSortMode

Property Value

TypeDescription
PropertyGridSortMode

A PropertyGridSortMode enumeration value that specifies the sort mode.

|

Available values:

NameDescription
Ascending

Sorts grid data by property headers in ascending order.

| | Descending |

Sorts grid data by definition headers in descending order.

| | Custom |

Sorts grid data using a custom sorting rule, implemented within the PropertyGridControl.Sort event handler.

| | Definitions |

Sorts grid data in definition order. Properties having no definitions are located below properties that have definitions.

| | NoSort |

Doesn’t sort grid data.

| | Unspecified |

Uses the value of the PropertyGridControl.SortMode property.

|

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 and/or grouping, set the SortMode property to ‘Custom’ and handle the PropertyGridControl.Sort event.

See Also

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace