Skip to main content

Dimension.SortOrder Property

Gets or sets the sort order of dimension values.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v23.2.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

[DefaultValue(DimensionSortOrder.Ascending)]
public DimensionSortOrder SortOrder { get; set; }

Property Value

Type Default Description
DimensionSortOrder Ascending

A DimensionSortOrder enumeration member that specifies the sort order of dimension values.

Remarks

Use the SortOrder property to toggle the sort order of dimension values.

To sort dimension values by a measure, use the Dimension.SortByMeasure property.

When the Top N Values feature is enabled, dimension values are forcibly sorted by the DimensionTopNOptions.Measure and the order is descending for Top N and ascending for Bottom N.

Example

The following code snippet shows how to sort values of the Continent dimension by summary values calculated for the Amount measure.

Dimension continentDimension = new Dimension("Continent");
Measure amountMeasure = new Measure("Amount", SummaryType.Sum);
continentDimension.SortByMeasure = amountMeasure;
continentDimension.SortOrder = DimensionSortOrder.Descending;
See Also