blazor-devexpress-dot-blazor-dot-pivottable-dot-dxpivottablefield-59eca7d0.md
Specifies the field’s sort order (ascending or descending).
Namespace : DevExpress.Blazor.PivotTable
Assembly : DevExpress.Blazor.PivotTable.v25.2.dll
NuGet Package : DevExpress.Blazor.PivotTable
[Parameter]
public PivotTableSortOrder SortOrder { get; set; }
| 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.
|
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.
See Also