QueryItemTemplateEventArgs.Template Property
Gets the HTML-CSS template.
Namespace: DevExpress.XtraGantt
Assembly: DevExpress.XtraGantt.v24.1.dll
NuGet Package: DevExpress.Win.Gantt
Declaration
Property Value
Type | Description |
---|---|
HtmlTemplate | The HTML-CSS template. |
Remarks
Use the Assign
method to assign a template to the e.Template
property. You can use one template for multiple element types.
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;
}
}
Read the following topic for information on how to assign templates: How to Assign Templates.
See Also