Skip to main content
All docs
V23.2

SchedulerControl.QueryAppointmentTemplate Event

Allows you to assign unique HTML templates to individual Appointments.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v23.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