This is a migrated thread and some comments may be shown as answers.

Recurrence data is null

1 Answer 95 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Cory
Top achievements
Rank 1
Cory asked on 13 Apr 2012, 06:26 PM
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.

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 17 Apr 2012, 03:39 PM
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 >>
Tags
Scheduler and Reminder
Asked by
Cory
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or