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

RepositoryItemLookUpEdit.SearchMode Property

Gets or sets how an end-user can search for specific rows in the lookup data source by typing within the editor (auto-completion or incremental search mode).

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(SearchMode.AutoFilter)]
[SmartTagProperty("Search Mode", "")]
public SearchMode SearchMode { get; set; }

Property Value

Type Default Description
SearchMode **AutoFilter**

A value of the SearchMode type determining the current search mode.

Available values:

Name Description
OnlyInPopup

The incremental search is enabled only when the dropdown window is open. If the window is closed, the user can modify the text in the edit box. However these changes are ignored.

When the dropdown is open the incremental search is performed against the column whose index is specified by the RepositoryItemLookUpEdit.AutoSearchColumnIndex property. The header of this column contains the search icon (binoculars). The user can click a specific column header to perform the search against this column.

LookupEdit_SearchMode_AutoComplete_search

AutoComplete

Enables the automatic completion feature. In this mode, when the dropdown is closed, the text in the edit box is automatically completed if it matches a RepositoryItemLookUpEditBase.DisplayMember field value of one of dropdown rows.

LookupEdit_SearchMode_AutoComplete_complete

When the dropdown is open, the automatic completion feature is disabled but the editor allows you to perform an incremental search in the same manner as when SearchMode.OnlyInPopup mode is active.

AutoFilter

Enables the incremental filtering feature. When you type within the edit box, the editor automatically opens the dropdown window and displays only records whose RepositoryItemLookUpEditBase.DisplayMember field value starts with the characters typed. Other records are not displayed. If you enter a value that does not match any record, the dropdown window will not contain any rows.LookupEdit_SearchMode_AutoFilter

Remarks

Use the SearchMode property to specify how an end-user can search for specific rows by typing within the editor. Possible modes are enumerated by the SearchMode type. You can enable incremental filtering of dropdown rows and automatic completion of text. The incremental search feature is available in SearchMode.AutoComplete and SearchMode.OnlyInPopup modes.

Refer to the SearchMode topic for more information.

Note: to enable text editing in the edit box, you should set the RepositoryItemLookUpEditBase.TextEditStyle property to TextEditStyles.Standard (the default is TextEditStyles.DisableTextEditor).

The following code snippets (auto-collected from DevExpress Examples) contain references to the SearchMode 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