Skip to main content
All docs
V25.1
  • GanttColumnBuilder<T>.HeaderCellTemplate(TemplateName) Method

    Specifies a custom template for column headers. Mirrors the client-side headerCellTemplate object.

    Namespace: DevExtreme.AspNet.Mvc.Builders

    Assembly: DevExtreme.AspNet.Core.dll

    Declaration

    public GanttColumnBuilder<T> HeaderCellTemplate(
        TemplateName name
    )

    Parameters

    Name Type Description
    name TemplateName

    A template name.

    Returns

    Type Description
    GanttColumnBuilder<T>

    A reference to this instance after the method is called.

    Remarks

    This method applies an external template to a cell. Refer to External Templates for more information and code examples.

    @(Html.DevExtreme().Gantt()
        .Columns(columns => {
            columns.Add().HeaderCellTemplate(new TemplateName("myGanttColumn_headerCellTemplate"));
        })
    )
    
    @using(Html.DevExtreme().NamedTemplate("myGanttColumn_headerCellTemplate")) {
        <div>
            Template content
        </div>
    }
    
    See Also