RepositoryItemLookUpEdit.SortColumnIndex Property

Gets or sets the visible column index against which data is sorted.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v21.2.dll


public int SortColumnIndex { get; set; }

Property Value

Type Default Description


The zero-based visible column index against which data is sorted.


Data in the editor’s dropdown can be sorted against a single column and this is specified by the SortColumnIndex property. This property indicates the column’s visible index in the dropdown. The visible index of a specific column can be obtained via the LookUpColumnInfoCollection.VisibleIndexOf method of the RepositoryItemLookUpEdit.Columns object.

To apply sorting to a column the column’s sort order must be specified via the LookUpColumnInfo.SortOrder property. If it’s set to ColumnSortOrder.None data isn’t sorted. If it’s set to ColumnSortOrder.Ascending or ColumnSortOrder.Descending data is sorted in ascending or descending order.

To enable end-users to sort by columns by clicking their headers set the RepositoryItemLookUpEdit.HeaderClickMode property to HeaderClickMode.Sorting.

See Also