DxPivotTableField.SortOrder Property
Specifies the field’s sort order (ascending or descending).
Namespace: DevExpress.Blazor.PivotTable
Assembly: DevExpress.Blazor.PivotTable.v25.1.dll
NuGet Package: DevExpress.Blazor.PivotTable
Declaration
[Parameter]
public PivotTableSortOrder SortOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| PivotTableSortOrder | A PivotTableSortOrder enumeration value. |
Available values:
| Name | Description |
|---|---|
| Ascending | Sorts the field values in ascending order. |
| Descending | Sorts the field values in descending order. |
Remarks
The Blazor Pivot Table automatically sorts data against fields that refer to the column and row areas. A sort glyph next to a field caption indicates the sort order (ascending or descending) for the corresponding field values. The default order is ascending. To set a sort order in code, use the field’s SortOrder property.
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Country)"
Area="@PivotTableArea.Row"
AreaIndex="1"
SortOrder="@PivotTableSortOrder.Descending"/>
To sort data in the UI, a user should click a field caption in the Pivot Table’s header area.
