Back to Devexpress

DxPivotTableField.SortOrder Property

blazor-devexpress-dot-blazor-dot-pivottable-dot-dxpivottablefield-59eca7d0.md

latest2.0 KB
Original Source

DxPivotTableField.SortOrder Property

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

Declaration

csharp
[Parameter]
public PivotTableSortOrder SortOrder { get; set; }

Property Value

TypeDescription
PivotTableSortOrder

A PivotTableSortOrder enumeration value.

|

Available values:

NameDescription
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.

razor
<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.

YouTube video

Implements

SortOrder

See Also

DxPivotTableField Class

DxPivotTableField Members

DevExpress.Blazor.PivotTable Namespace