Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 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

    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.v25.1.dll

    NuGet Package: DevExpress.Blazor

    #Declaration

    C#
    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