DxTreeList.SearchTextParseMode Property
Specify how the TreeList searches for a match if the query contains multiple words.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(TreeListSearchTextParseMode.GroupWordsByAnd)]
[Parameter]
public TreeListSearchTextParseMode SearchTextParseMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TreeListSearchTextParseMode | GroupWordsByAnd | An enumeration value. |
Available values:
Name | Description | Image |
---|---|---|
GroupWordsByAnd | The TreeList searches for a row containing all the words from the search query (in any order). |
|
GroupWordsByOr | The TreeList searches for a row containing any word from the search query. |
|
ExactMatch | The TreeList searches for an exact matching phrase. |
Remarks
The search feature filters data rows in the TreeList component and highlights search results. If the search text contains multiple words separated by a space, words can be treated as a single condition or individual conditions.
Use the SearchTextParseMode
property to specify how the TreeList component searches for a match if the query contains multiple words.
GroupWordsByAnd
The TreeList searches for a row containing all words from the search query (in any order). Words are treated as individual conditions grouped with the AND
logical operator.
In the following code snippet, the TreeList component finds every row that contains both Product and me in its cells:
<DxTreeList Data="@Data"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
ShowSearchBox="true"
SearchTextParseMode="TreeListSearchTextParseMode.GroupWordsByAnd"
SearchText="Product me">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" />
<DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" />
</Columns>
</DxTreeList>
GroupWordsByOr
The TreeList searches for a row containing any word from the search query. Words are treated as individual conditions grouped with the OR
logical operator.
In the following code snippet, the TreeList component finds every row that contains Product or me in its cells:
<DxTreeList Data="@Data"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
ShowSearchBox="true"
SearchTextParseMode="TreeListSearchTextParseMode.GroupWordsByOr"
SearchText="Product me">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" />
<DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" />
</Columns>
</DxTreeList>
ExactMatch
The TreeList searches for an exact matching phrase.
In the following code snippet, the TreeList component finds every row that contains the Product me phrase in a cell:
<DxTreeList Data="@Data"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
ShowSearchBox="true"
SearchTextParseMode="TreeListSearchTextParseMode.ExactMatch"
SearchText="Product me">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" />
<DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" />
</Columns>
</DxTreeList>
Search Syntax
Search text can include special characters that allow users to create composite criteria. Refer to the following section for additional information: Search Syntax.