Skip to main content

GridColumnHeaderCaptionTemplateContext Class

Stores information about a column header’s caption and is passed as the context parameter to the DxGrid.ColumnHeaderCaptionTemplate and DxGridColumn.HeaderCaptionTemplate.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor


public class GridColumnHeaderCaptionTemplateContext


The DxGrid.ColumnHeaderCaptionTemplate and DxGridColumn.HeaderCaptionTemplate accept a GridColumnHeaderCaptionTemplateContext object as the context parameter. You can use the parameter’s members to get information about the caption of the column header.

The following example shows the tooltip when a user hovers the mouse pointer over any column caption:

@using Microsoft.EntityFrameworkCore
@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory
@implements IDisposable

<DxGrid Data="@Data">
        <DxGridDataColumn FieldName="FirstName" />
        <DxGridDataColumn FieldName="LastName" />
        <DxGridDataColumn FieldName="Title" />
        <DxGridDataColumn FieldName="BirthDate" />
        <DxGridDataColumn FieldName="HireDate" />
        <span title="Click the header to sort data by this column. Drag and drop the header to change the column's position">

@code {
    IEnumerable<Employee> Data { get; set; }
    NorthwindContext Northwind { get; set; }
    Employee CurrentEmployee { get; set; }

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Data = Northwind.Employees

    public void Dispose() {

Blazor Grid Column Header Caption Template

Run Demo: Grid - Column Templates


See Also