Recurrence data is null

2 posts, 0 answers
  1. Cory
    Cory avatar
    11 posts
    Member since:
    Feb 2011

    Posted 13 Apr 2012 Link to this post

    My issues are 2 fold... first, I've created a Custom appointment dialog by implementing the EditAppointmentDialog.  My recurrence button is turned on and I can use that interface to set the recurrence properties.  When I try to save the data during the ApplySettingsToEvent() event, all of my Recurrence propertes in the targetEvent (RecurrencRule, RecurrenceId) are null.  But, in the UI on the radScheduler the recurring appointments show correctly.  How do I retrieve my recurrence information so that I may persist this data?

    My second issue is that I also have a custom appointment object that enherits from Telerik.WinControls.UI.Appointment.   In my radScheduler1_AppointmentEditDialogShowing() event I receive an error of "Unable to cast object type of 'Telerik.WinControls.UI.Appointment' to type 'CoachDashboard.CustomAppointment'".  My CustomAppointment class inherits from Telerik.WinControls.UI.Appointment.  Why would I get this error?  The only difference is that this appointment is a recurring appointment now.  It works fine when I don't set any recurrence.

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 17 Apr 2012 Link to this post

    Hello Cory,

    Thank you for writing.

    If you have set a recurrence pattern via the edit dialogs, then you should not get nulls for the RecurrenceRule field if you have called the base.ApplySettingsToEvent method. Please make sure that you are invoking the base method.

    As to the second issue, when you are using custom appointments, you should implement a custom appointment factory and also override the CreateNewEvent method of the EditAppointmentDialog. This is described in the following help article.

    I hope this will help you. Should you have additional questions, we will be glad to address them.

    Kind regards,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top