Back to Devexpress

SchedulerControl.CustomAppointmentFlyoutTemplateValue Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-f1f3c498.md

latest3.8 KB
Original Source

SchedulerControl.CustomAppointmentFlyoutTemplateValue Event

Allows you to pass values to elements bound to an appointment flyout’s data fields.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event EventHandler<CustomAppointmentFlyoutTemplateValueEventArgs> CustomAppointmentFlyoutTemplateValue
vb
Public Event CustomAppointmentFlyoutTemplateValue As EventHandler(Of CustomAppointmentFlyoutTemplateValueEventArgs)

Event Data

The CustomAppointmentFlyoutTemplateValue event's data class is CustomAppointmentFlyoutTemplateValueEventArgs. The following properties provide information specific to this event:

PropertyDescription
AppointmentGets an appointment for which the flyout is invoked.
FieldNameGets the field name that is displayed in the Appointment‘s HTML-CSS template.
FieldValueGets the field value that is displayed in the Appointment‘s HTML-CSS template.
Resource

Remarks

The following code snippet creates the GymLocation data field in the appointment flyout’s HTML-CSS template and passes a value to it:

csharp
private void schedulerControl1_AppointmentFlyoutShowing(object sender, DevExpress.XtraScheduler.AppointmentFlyoutShowingEventArgs args) {
    if ("GYM Training".Equals(args.FlyoutData.Appointment.Subject)) {
        args.HtmlTemplate.Template = "<div>The GYM is located here:</div><p>${GymLocation}</p>";
    }
}

private void schedulerControl1_CustomAppointmentFlyoutTemplateValue(object sender, DevExpress.XtraScheduler.CustomAppointmentFlyoutTemplateValueEventArgs args) {
    if ("GymLocation".Equals(args.FieldName)) {
        args.FieldValue = "312 W California Ave";
    }
}
vb
Private Sub schedulerControl1_AppointmentFlyoutShowing(ByVal sender As Object, ByVal args As DevExpress.XtraScheduler.AppointmentFlyoutShowingEventArgs)
    If "GYM Training".Equals(args.FlyoutData.Appointment.Subject) Then
        args.HtmlTemplate.Template = "<div>The GYM is located here:</div><p>${GymLocation}</p>"
    End If
End Sub

Private Sub schedulerControl1_CustomAppointmentFlyoutTemplateValue(ByVal sender As Object, ByVal args As DevExpress.XtraScheduler.CustomAppointmentFlyoutTemplateValueEventArgs)
    If "GymLocation".Equals(args.FieldName) Then
        args.FieldValue = "312 W California Ave"
    End If
End Sub

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace