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

LookUpColumnInfo.SortOrder Property

Gets or sets the sort order applied to the current column.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DefaultValue(ColumnSortOrder.None)]
[DXCategory("Data")]
public ColumnSortOrder SortOrder { get; set; }

Property Value

Type Default Description
ColumnSortOrder **None**

A ColumnSortOrder value specifying 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

Use this property to change the column’s sort order. The column’s sort order can be initialized via the LookUpColumnInfo constructor.

Note that the lookup editor supports sorting only against a single column and this is specified by the RepositoryItemLookUpEdit.SortColumnIndex property. If this column’s SortOrder property is set to ColumnSortOrder.None the data isn’t sorted. Otherwise the data is sorted in ascending or descending order according to the SortOrder property’s value.

Use the RepositoryItemLookUpEdit.SortColumnIndex property to select a column for sorting. An end-user can select a column for sorting by clicking its header providing that the RepositoryItemLookUpEdit.HeaderClickMode property is set to HeaderClickMode.Sorting.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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