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

RepositoryItemSearchControl.QueryIsSearchColumn Event

Enables you to specify the attached object’s columns through which a search is performed.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DXCategory("Events")]
public event QueryIsSearchColumnEventHandler QueryIsSearchColumn

Event Data

The QueryIsSearchColumn event's data class is DevExpress.XtraEditors.QueryIsSearchColumnEventArgs.

Remarks

By default, the SearchControl searches through all available columns of the attached object (RepositoryItemSearchControl.Client). See the figure below.

SearchControl_InGrid

The QueryIsSearchColumn event allows you to specify whether to perform a search in a specific column. This event is raised for each column of the attached object where the search is performed. Read the sender parameter to obtain the currently processed column. Set the QueryIsSearchColumnEventArgs.IsSearchColumn property to false to prevent the SearchControl from searching in this column.

The following code shows how to enable the SearchControl to search only in the Ship Country column.


private void searchControl1_QueryIsSearchColumn(object sender, DevExpress.XtraEditors.QueryIsSearchColumnEventArgs args) {
    if (sender.ToString() != "Ship Country") args.IsSearchColumn = false;
}

The figure below shows the grid filtered by the SearchControl when searching only against the Ship Country column.

SearchControl_InGridQuery

The editor’s SearchControl.QueryIsSearchColumn event is equivalent to the current event.

See Also