Skip to main content
All docs
V24.2

SchedulerControl.QueryResourceHeaderTemplate Event

Allows you to assign individual templates to different resource headers.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

Declaration

public event QueryResourceHeaderTemplateEventHandler QueryResourceHeaderTemplate

Event Data

The QueryResourceHeaderTemplate event's data class is DevExpress.XtraScheduler.QueryResourceHeaderTemplateEventArgs.

Remarks

The following code retrieves different templates from the HtmlTemplateCollection component and assigns them to resource headers depending on captions of these resources.

void OnQueryResourceHeaderTemplate(object sender, QueryResourceHeaderTemplateEventArgs e) {
    switch (e.ResourceHeader.Resource.Caption) {
        case ("Vacation"):
            e.Template.Assign(htmlTemplateCollection1[1]);
            break;
        case ("Work"):
            e.Template.Assign(htmlTemplateCollection1[2]);
            break;
        // ...
        default:
            e.Template.Assign(htmlTemplateCollection1[0]);
            break;
    }
}
See Also