DxDataGridCommandColumn.HeaderCellTemplate Property

Specifies a template used to display the header cell.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

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

Property Value

Type Description
RenderFragment

The template content.

Remarks

The HeaderCellTemplate property allows you to specify custom content for the command column’s header cell.

<DxDataGrid Data="@DataSource" >
    ...
    <DxDataGridCommandColumn Width="150px">
        <HeaderCellTemplate>
            <button type="submit" @onclick="@OnNewButtonClick">New</button>
        </HeaderCellTemplate>
    </DxDataGridCommandColumn>
</DxDataGrid>

@code {
    ...
    void OnNewButtonClick() {
        // your code 
    }
}

Online Demo

See Also