Skip to main content
Tag

ColumnBase.SortOrder Property

Gets or sets the column’s sort order. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

[Browsable(false)]
public ColumnSortOrder SortOrder { get; set; }

Property Value

Type Description
ColumnSortOrder

The column’s sort order.

Available values:

Name Description
None

No sorting is applied to a column.

Ascending

Sorts the column in ascending order.

Descending

Sorts the columns in descending order.

Remarks

To sort data against a column, specify its SortOrder property:

<dxg:GridColumn FieldName="City" SortOrder="Descending"/>
<dxg:GridColumn FieldName="Visits" SortOrder="Ascending"/>
<dxg:GridColumn FieldName="Birthday" SortOrder="None"/>

The SortOrder property does not clear the sorting applied. This property adds a new sorting condition to previous ones.

Refer to the Sorting in Code topic for more information.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SortOrder property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also