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.CustomizeAppointmentTemplate Event

    Allows you to hide specific HTML elements at runtime, or change their CSS style properties.

    Namespace: DevExpress.XtraScheduler

    Assembly: DevExpress.XtraScheduler.v25.1.dll

    NuGet Package: DevExpress.Win.Scheduler

    #Declaration

    public event CustomizeAppointmentTemplateEventHandler CustomizeAppointmentTemplate

    #Event Data

    The CustomizeAppointmentTemplate event's data class is DevExpress.XtraScheduler.CustomizeAppointmentTemplateEventArgs.

    #Remarks

    Use the e.HtmlElement method to obtain a required HTML element. Once the element is located, change its Hidden property to control the element’s visibility, or call the Style.SetProperty method to modify CSS style properties.

    private void OnCustomizeAppointmentTemplate(object sender, CustomizeAppointmentTemplateEventArgs e) {
        var templateImage = e.HtmlElement.FindElementById("dinner_icon");
        if (...)
            templateImage.Hidden = true; // Hide the HTML element
        templateImage.Style.SetProperty("height", "32px"); // Modify the CSS property
    }
    

    Refer to the following help article for more information: HTML Templates in Scheduler.

    See Also