Skip to main content

RepositoryItemGridLookUpEdit.SearchMode Property

Gets or sets whether the editor automatically completes the value, filters the drop-down list, or provides custom suggestions when the user types a query in the edit box.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraGrid.v24.1.dll

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

Declaration

[DefaultValue(GridLookUpSearchMode.AutoComplete)]
[DXCategory("Behavior")]
public GridLookUpSearchMode SearchMode { get; set; }

Property Value

Type Default Description
GridLookUpSearchMode AutoComplete

A value that specifies the editor behavior when the user types a query in the edit box.

Available values:

Name Description
None

The editor does not automatically complete the query.

AutoComplete

The editor looks for values that start with the entered query and automatically selects the first row that fits the query.

image

The query is compared against values in the DisplayMember data source field.

The completed value is automatically assigned to the EditValue property.

AutoSuggest

The editor fires the GridLookUpEdit.Properties.AutoSuggest event that allows you to provide custom suggestions in the drop-drop list.

This mode is suitable if the editor is not bound to a data source.

The TextEditStyle property is automatically set to Standard in this mode.

AutoSearch

The editor looks for values that contain the entered query, filters the drop-down list, and highlights the found query.

image

To assign a value to the EditValue property, the user should select a row and press Enter or double-click it.

The TextEditStyle property is automatically set to Standard in this mode.

Remarks

A lookup editor allows users to select a value from a drop-down list. However, users can type a query in the edit box. Depending on the SearchMode property, the editor looks for an appropriate value in the drop-down list: automatically selects the first row that starts with the query, shows only rows that contain the query, or provides custom suggestions (even if the editor is not bound to a data source).

Note

Run the Extended Lookup Editor demo to see the modes in action for the GridLookUpEdit. Run the Lookup Editor or Auto-Suggest Lookup Editor demo to see the modes in action for the LookUpEdit control. Click Open Solution in the ribbon for source codes.

See Also