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.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

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.

See Also