PivotGridField.SortMode Property
Specifies the sorting algorithm used to sort field values. This is a dependency property.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll
NuGet Package: DevExpress.Wpf.PivotGrid
Declaration
Property Value
Type | Description |
---|---|
FieldSortMode | A FieldSortMode enumeration member that specifies the sorting algorithm. |
Available values:
Name | Description |
---|---|
Default | Sorts the field’s data by the field’s values (these are synchronized with the values from the bound data source). |
Value | Sorts the field’s data by the field’s values (these are synchronized with the values from the bound data source). |
DisplayText | Sorts the field’s data by the field’s display text (the strings displayed within the field values). In OLAP mode, the data is sorted against the text generated on the server. The field will not be sorted against the custom text generated on the client side (for instance, if you modify the text via the PivotGridControl.FieldValueDisplayText event). |
Custom | Forces the PivotGridControl to fire the PivotGridControl.CustomFieldSort event that allows you to specify a custom algorithm to sort the field values. Not supported in OLAP mode. |
Key | Sorts the field’s data by key attributes. This option is in effect only in OLAP mode. |
ID | Sorts by a level member’s ID (in OLAP mode). |
None | Data is not sorted, and it’s displayed in the order specified by the data source. This option is in effect only in OLAP mode. |
DimensionAttribute | Sorts the field’s data by an OLAP member property (in OLAP mode). |
Remarks
The SortMode property determines the algorithm used to sort field data (by display text, edit value, or the use of a custom sorting algorithm).
To implement a custom sorting algorithm, set the SortMode property to FieldSortMode.Custom and handle the PivotGridControl.CustomFieldSort event.
To sort field values, set the field’s PivotGridField.SortOrder property to FieldSortOrder.Ascending or FieldSortOrder.Descending. This arranges the field values in ascending or descending order, according to the algorithm that is specified by the SortMode property.
Note
The tree-like (hierarchical) view of the excel filter is available only when the SortMode
property equals Value.