A newer version of this page is available. Switch to the current version.

DataViewBase.SearchStringToFilterCriteria Event

Occurs after changing the Search Panel's string.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.Core.dll

Declaration

public event SearchStringToFilterCriteriaEventHandler SearchStringToFilterCriteria
Public Event SearchStringToFilterCriteria As SearchStringToFilterCriteriaEventHandler

Event Data

The SearchStringToFilterCriteria event's data class is SearchStringToFilterCriteriaEventArgs. The following properties provide information specific to this event:

Property Description
ApplyToColumnsFilter Gets or sets whether the column's filter popup detects changes in the search panel.
Filter Gets or sets the filter that is applied to the GridControl.
Highlighting Gets or sets highlighting strings for fields.
SearchString Gets the search string entered in the Search.
Source Gets the GridControl.

Remarks

TIP

Topic: Search

The DataViewBase.SearchStringToFilterCriteria occurs after the search string is changed.

The following code sample shows how to make the Search Panel search for a string that contains a space character without the need to specify this string in quotation marks:

<dxg:TableView 
    SearchStringToFilterCriteria="TableView_SearchStringToFilterCriteria"
    SearchString="Alex Mercer" SearchPanelAllowFilter="False"/> 
void TableView_SearchStringToFilterCriteria(object sender, SearchStringToFilterCriteriaEventArgs e) {
    e.Filter = CriteriaOperator.Parse(string.Format("Contains([Name], '{0}')", e.SearchString));
}

See Also