I have implemented a custom edit dialog, as described in
scheduler-appointments-and-dialogs-adding-a-custom-field-to-the-editappointment-dialog
I would like to show the custom "E-mail" property in the scheduler itself, and have added a handler to the AppointmentFormatting event:
private void rsBookings_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e)
{
if (e.Appointment.DataItem == null && e.Appointment.MasterEvent == null) return;
var appointment= (Booking)e.Appointment.DataItem ??
(e.Appointment.MasterEvent.DataItem != null
? (Booking)e.Appointment.MasterEvent.DataItem
: null);
if (appointment != null)
{
string description = string.Format("{0}{1}{2}{1}{3}", appointment.BookingSubject, Environment.NewLine,
appointment.Email);
e.AppointmentElement.ShowAppointmentDescription = true;
e.AppointmentElement.AppointmentLocation = appointment.BoothDesc;
e.AppointmentElement.AppointmentSubject = description;
e.AppointmentElement.ToolTipText = description;
}
}
When the application is loaded the values are shown as required, but if the CustomEditDialog is opened, the e-mail is changed, it is not reflected in the scheduler. The AppointmentLocation (which is not custom) is updated though, so is the database with all edited values.
What am I missing?
Regards, Jill-Connie Lorentsen