Hello
I followed the Scheduler documentation to the letter to get ScheduleView working with RIA services and I am nearly there. Currently I am trying to implement the code detailed in this page (http://www.telerik.com/help/silverlight/radscheduler-populating-with-data-ria-service-edit.html)
There are a few things I am having a problem with.
1) How do I gaurentee I get the master appointment as the demo code
I am currently using
But I am not entirely convinced this is correct if I have just deleted an appointment in a recurrence set that is not the first (master) one. Please advise.
2) How do I implement the demo code
Currently I am using the GetOccurrenceWithoutExceptionsFromDateTimeRange helper thus...
But again, I feel I am floundering around in the dark here.
3) The example code given in the help docs uses "switch (args.ExceptionAction)" but this does not exist in ScheduleView. Please explain how to implement.
I realise the help is for Scheduler and not ScheduleView, but there is little else to go on :-)
Can you explain or demonstrate how I implement that code block from the help page cited?
BTW, I followed the articles that use the M2M4Ria T4 templates, but this is not suitable for our project at this present time. The example code is a better match and I am at the final stage now so would really like to get this going :-)
Many thanks
Mark.
I followed the Scheduler documentation to the letter to get ScheduleView working with RIA services and I am nearly there. Currently I am trying to implement the code detailed in this page (http://www.telerik.com/help/silverlight/radscheduler-populating-with-data-ria-service-edit.html)
There are a few things I am having a problem with.
1) How do I gaurentee I get the master appointment as the demo code
Appointment masterAppt = e.ExceptionOccurrence.Master as Appointment;
I am currently using
Appointment editedAppt = args.Appointment as Appointment;
But I am not entirely convinced this is correct if I have just deleted an appointment in a recurrence set that is not the first (master) one. Please advise.
2) How do I implement the demo code
if ( e.ExceptionOccurrence == null )
Currently I am using the GetOccurrenceWithoutExceptionsFromDateTimeRange helper thus...
if (args.Appointment.GetOccurrencesWithoutExceptionsFromDateTimeRange(_visibleDateRangeSelected.Start, _visibleDateRangeSelected.End) == null)
But again, I feel I am floundering around in the dark here.
3) The example code given in the help docs uses "switch (args.ExceptionAction)" but this does not exist in ScheduleView. Please explain how to implement.
switch (args.ExceptionAction)
{
case ExceptionAction.Add:
case ExceptionAction.Delete:
case ExceptionAction.Edit:
{
// Adding, deleting, and editing an exception are the same thing as far as
// RecurrenceExceptionHelper is concerned, since we are changing the exception set,
// all we need to do is update the serialized string and we're good to go!
dbApptToEdit.ExceptionAppointments = RecurrenceExceptionHelper.MakeExceptionsString(masterAppt.RecurrenceRule.Exceptions.ToList<
ExceptionOccurrence
>());
break;
}
case ExceptionAction.None:
{
// We're deleting or resetting the recurrence rule, so we need to reset the exceptions
// *** This mimics the behavior of RadScheduler
dbApptToEdit.ExceptionAppointments = "";
break;
}
}
I realise the help is for Scheduler and not ScheduleView, but there is little else to go on :-)
Can you explain or demonstrate how I implement that code block from the help page cited?
BTW, I followed the articles that use the M2M4Ria T4 templates, but this is not suitable for our project at this present time. The example code is a better match and I am at the final stage now so would really like to get this going :-)
Many thanks
Mark.