Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeView.FilterStringChanged Event

Fires when a component’s filter string changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<string> FilterStringChanged { get; set; }

#Parameters

Type Description
String

The new FilterString property value.

#Remarks

The FilterStringChanged event allows you to handle changes to the FilterString property value.

In the following example, an error message appears if a user types less than 4 characters in the search panel:

razor
<DxTreeView @ref="@treeView"
            ShowFilterPanel="true"
            FilterStringChanged=@OnFilterStringChanged
            FilterMinLength="4"
            FilterMode="NavigationFilterMode.Nodes"
            CssClass="cw-480"
            Data="@DataSource"
            LoadChildNodesOnDemand="true">
    <DataMappings>
        <DxTreeViewDataMapping HasChildren="HasSubGroups"
                               Children="SubGroups"
                               Text="Title" />
    </DataMappings>
</DxTreeView>

@Message

@code {
    string Message = "";
    void OnFilterStringChanged(string NewString) {
        if (NewString.Length < 4)
            Message = "You need to enter at least 4 characters to apply the filter";
        else
            Message = "";
    }
    @* ... *@
}

Filter String Changes

See Also