Back to Devexpress

DxAccordion.FilterMinLength Property

blazor-devexpress-dot-blazor-dot-dxaccordion-1a31033a.md

latest2.0 KB
Original Source

DxAccordion.FilterMinLength Property

Specifies the minimum number of characters a user must type in the search box to apply the filter.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(3)]
[Parameter]
public int FilterMinLength { get; set; }

Property Value

TypeDefaultDescription
Int323

The minimum length.

|

Remarks

Use the FilterMinLength property to specify the FilterString property value’s length at which the component starts to filter its items. If the FilterString length is less than FilterMinLength, the component does nothing. Note that this property also affects filter operations executed from code.

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

razor
<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 = "";
    }
    @* ... *@
}

See Also

DxAccordion Class

DxAccordion Members

DevExpress.Blazor Namespace