Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 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.QueryAppointmentTemplate Event

Allows you to assign unique HTML templates to individual Appointments.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

public event QueryAppointmentTemplateEventHandler QueryAppointmentTemplate

#Event Data

The QueryAppointmentTemplate event's data class is DevExpress.XtraScheduler.QueryAppointmentTemplateEventArgs.

#Remarks

The following sample applies the “OffDutyTimeAppTemplate” for all regular Day View appointments that start at 5 p.m. or later:

private void SchedulerControl1_QueryAppointmentTemplate(object sender, QueryAppointmentTemplateEventArgs e) {
    SchedulerControl scheduler = sender as SchedulerControl;
    if (scheduler.ActiveViewType == SchedulerViewType.Day && e.Appointment.Type == AppointmentType.Normal &&
        e.Appointment.Start.Hour >= 17)
            e.Template.Assign(OffDutyTimeAppTemplate);
}

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

See Also