DxTreeView.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:
<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 = "";
}
@* ... *@
}
See Also