Back to Devexpress

SchedulerResourceHeaderOptions.ResourceHeaderHtmlTemplate Property

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerresourceheaderoptions-d7b19bcd.md

latest4.1 KB
Original Source

SchedulerResourceHeaderOptions.ResourceHeaderHtmlTemplate Property

Returns the template applied to the resource header area.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
public SchedulerHtmlTemplateItem ResourceHeaderHtmlTemplate { get; }
vb
<XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)>
Public ReadOnly Property ResourceHeaderHtmlTemplate As SchedulerHtmlTemplateItem

Property Value

TypeDescription
SchedulerHtmlTemplateItem

The template applied to the resource header area.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ResourceHeaderHtmlTemplate
SchedulerOptionsView

.ResourceHeaders .ResourceHeaderHtmlTemplate

|

Remarks

The Scheduler Control displays resource headers when appointments are grouped by resources (the View.GroupType property equals “Resource”).

Note that the template does not occupy the entire header client area. If you wish to stretch a template across the entire client region, draw it on the CustomDrawResourceHeader event.

csharp
void OnCustomDrawResourceHeader(object sender, CustomDrawObjectEventArgs e) {
    e.Handled = true;
    e.DrawHtml(htmlTemplateCollection[0]);
}
vb
Private Sub OnCustomDrawResourceHeader(ByVal sender As Object, ByVal e As CustomDrawObjectEventArgs)
    e.Handled = True
    e.DrawHtml(htmlTemplateCollection(0))
End Sub

Templates are not applied when resources are displayed as tabs (when the Scheduler.OptionsView.ResourceCategories.ResourceDisplayStyle property is set to “Tabs”).

Utilize the Assign method to set a template in code.

csharp
schedulerControl1.OptionsView.ResourceHeaders.ResourceHeaderHtmlTemplate.Assign(tCollection[0]);
vb
schedulerControl1.OptionsView.ResourceHeaders.ResourceHeaderHtmlTemplate.Assign(tCollection(0))

Template-related events:

See Also

SchedulerResourceHeaderOptions Class

SchedulerResourceHeaderOptions Members

DevExpress.XtraScheduler Namespace