Skip to main content
A newer version of this page is available. .

Dimension.SortOrder Property

Gets or sets the sort order of dimension values.

Namespace: DevExpress.DashboardCommon

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

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.

Available values:

Name Description
Ascending

Sort dimension values in ascending order.

Descending

Sort dimension values in descending order.

None

No sorting is applied to dimension values.

Note

Note that this sort order is in effect in OLAP mode only.

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