Skip to main content
All docs
V22.2

GanttControl.HtmlTemplates Property

A collection of HTML-CSS templates that can be applied to Gantt UI elements.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v22.2.dll

NuGet Package: DevExpress.Win.Gantt

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Collection)]
public HtmlTemplateCollection HtmlTemplates { get; }

Property Value

Type Description
HtmlTemplateCollection

Stores HTML-CSS templates.

Remarks

Gantt Control supports HTML/CSS templates for the following UI elements:

Handle the GanttControl.QueryItemTemplate event to apply a template.

HTML templates in Gantt Control

void GanttControl1_QueryItemTemplate(object sender, QueryItemTemplateEventArgs e) {
    switch(e.ItemType) {
        case GanttChartItemType.Task:
        case GanttChartItemType.SummaryTask:
            e.Template.Assign(TaskTemplate);
            break;
        case GanttChartItemType.Progress:
        case GanttChartItemType.SummaryTaskProgress:
            e.Template.Assign(TaskProgressTemplate);
            break;
        case GanttChartItemType.TextLabel:
            e.Template.Assign(TaskTextLabelTemplate);
            break;
    }
}

See this documentation article for more information: HTML Templates in Gantt Control.

See Also