blazor-devexpress-dot-blazor-dot-dxtreelist-4af7db7f.md
Specify how the TreeList searches for a match if the query contains multiple words.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(TreeListSearchTextParseMode.GroupWordsByAnd)]
[Parameter]
public TreeListSearchTextParseMode SearchTextParseMode { get; set; }
| 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.
|
|
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.
Read Tutorial: Search Box Run Demo: TreeList - Search Box
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>
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>
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 text can include special characters that allow users to create composite criteria. Refer to the following section for additional information: Search Syntax.
See Also