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

RepositoryItemLookUpEdit.HeaderClickMode Property

Gets or sets which functionality is invoked as a result of clicking a column header within the dropdown.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(HeaderClickMode.Sorting)]
[DXCategory("Behavior")]
public HeaderClickMode HeaderClickMode { get; set; }

Property Value

Type Default Description
HeaderClickMode Sorting

A HeaderClickMode value specifying how the editor acts after its column header is clicked.

Available values:

Name Description
Sorting

Clicking a column’s header sorts the data by that column.

AutoSearch

Clicking a column’s header selects this column for incremental searching.

Remarks

A lookup editor supports sorting data by a single column. If the HeaderClickMode property is set to HeaderClickMode.Sorting clicking a column header will apply sorting against this column. A subsequent click on this column header will reverse the column’s sort order.

Sorting can be applied to a column in any mode via code. Just specify the column to be sorted via the RepositoryItemLookUpEdit.SortColumnIndex property and set the required sort order via the column’s LookUpColumnInfo.SortOrder property.

If the HeaderClickMode property is set to HeaderClickMode.AutoSearch clicking a column header will specify this column as the one on which incremental searches should be performed. When an end-user types text within the dropdown the editor tries to locate the record which contains the typed text in this column. This column is marked by a search icon (binoculars) displayed in the column header.

To specify which column is the one on which incremental searches are performed via code use the RepositoryItemLookUpEdit.AutoSearchColumnIndex property. Incremental searching is available even if the HeaderClickMode property is not set to HeaderClickMode.AutoSearch. Incremental searching is not supported when the RepositoryItemLookUpEdit.SearchMode property is set to SearchMode.AutoFilter.

See Also