Skip to main content

RepositoryItemLookUpEdit.AutoSearchColumnIndex Property

Gets or sets the visible column index against which an incremental search is performed in SearchMode.AutoComplete and SearchMode.OnlyInPopup modes.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
public int AutoSearchColumnIndex { get; set; }

Property Value

Type Description
Int32

The zero-based visible column index against which an incremental search is performed.

Remarks

The LookUpEdit control supports the incremental search feature which allows an end-user to locate the required row on the fly. With this feature, an end-user can type within the editor and as a result the editor automatically searches for the typed string against a specific column. The search column is identified by the AutoSearchColumnIndex property.

The incremental search feature is supported if the RepositoryItemLookUpEdit.SearchMode property is set to SearchMode.AutoComplete or SearchMode.OnlyInPopup. In SearchMode.AutoFilter mode this feature is disabled.

The AutoSearchColumnIndex property specifies the zero-based index of the visible column against which an incremental search is performed. The current search column is visually identified by a search icon (binoculars) displayed in the column header. In the following image the search is performed against the first column:

LookupEdit_SearchIcon

If the RepositoryItemLookUpEdit.HeaderClickMode property is set to AutoSearch, an end-user can select a column for an incremental search by clicking its header. See the RepositoryItemLookUpEdit.ShowHeader property to specify the visibility of column headers.

If the AutoSearchColumnIndex property is set to -1 no column displays the search icon and clicking any column header doesn’t select this column for incremental search.

If the dropdown window is closed and RepositoryItemLookUpEdit.SearchMode is SearchMode.AutoComplete, the search is also performed against the RepositoryItemLookUpEditBase.DisplayMember field.

In SearchMode.OnlyInPopup mode, the incremental search is available only when the dropdown is open.

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