Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    SchedulerControl.QueryResourceHeaderTemplate Event

    Allows you to assign individual templates to different resource headers.

    Namespace: DevExpress.XtraScheduler

    Assembly: DevExpress.XtraScheduler.v25.1.dll

    NuGet Package: DevExpress.Win.Scheduler

    #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