Skip to main content
All docs
V24.1

IComboBoxSettings.SearchTextParseMode Property

Specifies how the combo box editor treats search words.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(ListSearchTextParseMode.Default)]
[Parameter]
ListSearchTextParseMode SearchTextParseMode { get; set; }

Property Value

Type Default Description
ListSearchTextParseMode Default

An enumerarion value.

Available values:

Name Description
Default

The ExactMatch is used by default. The search words are not treated separately. Only records that match the search text exactly are shown.

GroupWordsByAnd

The search words are grouped as individual conditions by the AND logical operator. Only records that match all the conditions are shown.

GroupWordsByOr

The search words are treated as individual conditions grouped by the OR logical operator. Records that match at least one of these conditions are shown.

ExactMatch

The search words are not treated separately. Only records that match the search text exactly are shown.

Remarks

The search feature allows users to locate and highlight the search text in combo box editor data. If the search text contains multiple words separated by space characters, the words can be treated as a single condition or as individual conditions grouped by the Or or And operator.

Use the SearchTextParseMode property to specify how the combo box editor component treats search words.

The IComboBoxSettings interface allows you to get and customize settings of a combo box editor at runtime. You can get editor settings in the following ways:

  • Call the GetColumnEditSettings method to get editor settings of the column bound to the specified data source field.

    Important

    You need to enclose your code between BeginUpdate and EndUpdate method calls to change values of Grid component parameters outside the Grid component markup. Otherwise, an exception occurs.

    var comboBoxSettings = e.Grid.GetColumnEditSettings<IComboBoxSettings>("CategoryId");
    if(comboBoxSettings != null) {
        e.Grid.BeginUpdate();
        comboBoxSettings.SearchTextParseMode=ListSearchTextParseMode.GroupWordsByAnd;
        e.Grid.EndUpdate();
    }
    
  • Handle the CustomizeFilterRowEditor event to customize a cell editor in the filter row.
    void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
        if(e.EditSettings is IComboBoxSettings comboBoxSettings)
            comboBoxSettings.SearchTextParseMode=ListSearchTextParseMode.GroupWordsByAnd;
    }
    
  • Handle the CustomizeDataRowEditor event to customize a cell editor in a data row.
    void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) {
        if(e.EditSettings is IComboBoxSettings comboBoxSettings)
            comboBoxSettings.SearchTextParseMode=ListSearchTextParseMode.GroupWordsByAnd;
    }
    
See Also