Skip to main content
All docs
V24.1

DxTreeListSelectionColumn.FilterRowCellTemplate Property

Specifies a template for the selection column’s filter row cell.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment<TreeListSelectionColumnFilterRowCellTemplateContext> FilterRowCellTemplate { get; set; }

Property Value

Type Description
RenderFragment<TreeListSelectionColumnFilterRowCellTemplateContext>

The selection column’s filter row cell template.

Remarks

A selection column allows users to select and deselect rows. This column contains checkboxes or radio buttons depending on selection mode.

The selection column’s cell located in the filter row is empty. You can define the FilterRowCellTemplate to display custom content in this cell. Use the template’s context parameter to access SelectionColumn and TreeList objects.

The following code snippet hides the predefined Select All checkbox from the selection column header and display the custom Select All button in the filter row cell.

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            @bind-SelectedDataItems="@SelectedDataItems"
            @ref="MyTreeList"
            ShowFilterRow="true">
    <Columns>
        <DxTreeListSelectionColumn AllowSelectAll="false">
            <FilterRowCellTemplate>
                <DxButton Click="() => MyTreeList.SelectAllOnPage()" Text="Select All"
                          RenderStyle="ButtonRenderStyle.Link" />
            </FilterRowCellTemplate>
        </DxTreeListSelectionColumn>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

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

    IReadOnlyList<object> SelectedDataItems { get; set; }
    ITreeList MyTreeList { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
        SelectedDataItems = TreeListData.Skip(1).Take(2).ToList();
    }
}

Blazor TreeList Selection Column Filter Row Cell

For more information, refer to the following topics:

See Also