Custom property is not updated in RadScheduler.

3 posts, 0 answers
  1. Jill-Connie Lorentsen
    Jill-Connie Lorentsen avatar
    118 posts
    Member since:
    Nov 2008

    Posted 07 May 2014 Link to this post

    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,
                    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
  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4077 posts

    Posted 09 May 2014 Link to this post

    Hello Jill-Connie,

    Thank you for writing.

    Following the referred help article, I have prepared a sample project, demonstrating how to add a custom property ("Email") to the EditAppointmentDialog. When the mentioned property is changed, the certain appointment is successfully updated.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Jill-Connie Lorentsen
    Jill-Connie Lorentsen avatar
    118 posts
    Member since:
    Nov 2008

    Posted 12 May 2014 Link to this post

    Thank you for your reply.

    I don't think I expressed myself clearly. The update of the database works fine. I want the e-mail to be shown in the appointment in the scheduler.

    Please see the attached image, and referencing the AppointmentFormatting event in my previous post:
    e.AppointmentElement.AppointmentLocation = "Test location"
    e.AppointmentElement.AppointmentSubject =  "Appointment" newline "Hans Pettersen" newline ""

    appointment.BookingSubject = "Appointment" newline "Hans Pettersen"
    appointment.Email = ""

    If I edit the e-mail of the appointment the changes are not reflected in the scheduler GUI.
    If I edit both the location and the e-mail the GUI is updated as required.

    The database is updated as required in both cases.

    How can I update the GUI when the only change in the appointment is the e-mail?
Back to Top