Skip to main content
All docs
V25.1
  • 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).

    Search Box: And Mode

    GroupWordsByOr

    The TreeList searches for a row containing any word from the search query.

    Search Box: Or Mode

    ExactMatch

    The TreeList searches for an exact matching phrase.

    Search Box: Exact Mode

    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.

    Read Tutorial: Search Box Run Demo: TreeList - Search Box

    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>
    

    Search Box: And Mode

    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>
    

    Search Box: Or Mode

    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 Box: Exact Mode

    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.

    Implements

    See Also