Skip to main content
All docs
V24.1

TreeListColumnHeaderCaptionTemplateContext Class

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public class TreeListColumnHeaderCaptionTemplateContext :
    GridColumnHeaderCaptionTemplateContextBase

Remarks

The DxTreeList.ColumnHeaderCaptionTemplate and DxTreeListColumn.HeaderCaptionTemplate accept a TreeListColumnHeaderCaptionTemplateContext 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 a tooltip when a user hovers the mouse pointer over any column caption:

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
    <ColumnHeaderCaptionTemplate>
        <span title="Click the header to sort data by this column. Drag and drop the header to change the column's position">
            @context.Caption
        </span>
    </ColumnHeaderCaptionTemplate>
</DxTreeList>

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

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
}

Blazor TreeList Column Header Caption Template

Inheritance

Object
DevExpress.Blazor.Internal.GridTemplateContextBase
DevExpress.Blazor.Internal.GridColumnHeaderCaptionTemplateContextBase
TreeListColumnHeaderCaptionTemplateContext
See Also