Skip to main content
All docs
V24.2

TreeListCustomizeFilterRowEditorEventArgs.FieldName Property

Returns the name of the data field whose editor is being processed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public string FieldName { get; }

Property Value

Type Description
String

The field name.

Remarks

Handle the CustomizeFilterRowEditor event to customize filter row editors separately from data row editors. The following example hides clear buttons in filter row editors displayed for Task and Employee Name columns:

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId" 
            ShowFilterRow="true"
            CustomizeFilterRowEditor="TreeList_CustomizeFilterRowEditor">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@code {
    List<EmployeeTask> TreeListData { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
    void TreeList_CustomizeFilterRowEditor(TreeListCustomizeFilterRowEditorEventArgs e) {
        if(e.FieldName == "Name" || e.FieldName == "EmployeeName") {
            var settings = e.EditSettings as ITextEditSettings; 
            settings.ClearButtonDisplayMode = DataEditorClearButtonDisplayMode.Never;
        }
    }
}
See Also