Skip to main content

DxAccordion.FilterStringChanged Event

Fires when a component’s filter string changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[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:

<DxAccordion ShowFilterPanel="true"
             FilterStringChanged=@OnFilterStringChanged
             FilterMinLength="4"
             CssClass="cw-480"
             Data="@Data">
    <DataMappings>
        <DxAccordionDataMapping ParentKey="CategoryId"
                                Key="Id"
                                Text="Name" />
    </DataMappings>
</DxAccordion>

@Message

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

Filter String Changes

See Also