Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeListSelectionColumn.FilterRowCellTemplate Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

#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