Skip to main content
All docs
V24.2

SchedulerControl.CustomizeAppointmentTemplate Event

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

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

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