DxDataGridCommandColumn.HeaderFilterCellTemplate Property

Specifies a template used to display the cell that is located in the filter row and contains the Clear button.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public RenderFragment HeaderFilterCellTemplate { get; set; }

Property Value

Type Description
RenderFragment

The template content.

Remarks

Use the HeaderFilterCellTemplate property to specify custom content for the command column’s filter cell. This cell is located in the filter row and contains the Clear button.

The following example shows the Add button in the filter cell to create new data rows. The example also disables the NewButtonVisible property to hide the default New button.

<DxDataGrid DataAsync="@ForecastService.GetForecastAsync"
            ShowFilterRow="true"
            @ref="MyGrid"
            ...>
    @*...*@
    <DxDataGridCommandColumn Width="100px" NewButtonVisible="false">
        <HeaderFilterCellTemplate>
            <DxButton RenderStyle="ButtonRenderStyle.Link" Click="@OnButtonClick">Add</DxButton>
        </HeaderFilterCellTemplate>
    </DxDataGridCommandColumn>
</DxDataGrid>

@code {
    // ...
    void OnButtonClick() {
        MyGrid.StartRowEdit(null); 
    }
}

Data Grid Header Filter Cell Template

See Also