Skip to main content
All docs
V24.1

DxTreeListDataColumn.FilterRowValueChanged Event

Fires when the value in the column’s filter row editor changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<object> FilterRowValueChanged { get; set; }

Parameters

Type Description
Object

A new FilterRowValue value.

Remarks

The FilterRowValueChanged event fires each time the FilterRowValue property value changes. The event is handled automatically when you use two-way data binding for the FilterRowValue property (@bind-FilterRowValue).

You can also handle this event to create a custom response to filter row value changes.

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" ShowFilterRow="true">
    <Columns>
        <DxTreeListDataColumn FieldName="Name"
                              Caption="Task"
                              FilterRowValue="@FilterRowValue"
                              FilterRowValueChanged="OnFilterRowValueChanged"
                              FilterRowOperatorType="TreeListFilterRowOperatorType.Contains" />
        <DxTreeListDataColumn FieldName="EmployeeName"  />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

<div><b>@FilterRowValueInfo</b></div>

@code {
    string FilterRowValue { get; set; } = "Update";
    string FilterRowValueInfo { get; set; }
    List<EmployeeTask> TreeListData { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
    void OnFilterRowValueChanged(object newFilterRowValue) {
        if (newFilterRowValue != null) {
            FilterRowValue = newFilterRowValue.ToString();
            FilterRowValueInfo = "The 'Task' column filter value is '" + FilterRowValue + "'";
        } else {
            FilterRowValue = "";
            FilterRowValueInfo = "The 'Task' column filter value is cleared";
        }
    }
}

Blazor TreeList Filter Row Value Changed

For more information about filter row, see the following topic: Filter Row in Blazor TreeList.

See Also