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

a issue delete an instance of a recurring event

3 Answers 62 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
william
Top achievements
Rank 1
william asked on 21 Apr 2011, 02:51 AM

When i want to delete an instance of a recurring event, the fuction "theScheduler_AppointmentUpdate" will  fired . My code is as bellow ,

void theScheduler_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
  Appointment appointment = e.Appointment; 

  // People resizing 
  SPListItem li = GetListItem(appointment);
 
  if (appointment.RecurrenceState == RecurrenceState.Master)
  {
     // This means somebody try to delete an instance of recurring event                    
     RecurrenceRule recRule;
     RecurrenceRule.TryParse(appointment.RecurrenceRule, out recRule);
     if (recRule != null && recRule.Exceptions.Count > 0)
     {
        // The last exception is the DateTime of the deleted appointment
        DateTime deletedDateTime = recRule.Exceptions[recRule.Exceptions.Count - 1];
        CreateDeletedAppointment(deletedDateTime, appointment, li);
     }
   }
}
I find that the recRule.Exceptions always equal to 0 . Can somebody help me with this issue ? (I know that the "Exceptions" is created when we edit a recurring appointment)

3 Answers, 1 is accepted

Sort by
0
william
Top achievements
Rank 1
answered on 22 Apr 2011, 07:56 AM
I debug my code , i notice that "e.Appointment.Start" is "4/22/2006 7:00:00 AM" , actually it should be "4/22/2011 7:00:00 AM"  . Is anyone knows the reason? Any suggestion is appreciate  .
0
Peter
Telerik team
answered on 22 Apr 2011, 12:59 PM
Hello William,

Can you examine e.ModifiedAppointment? Do you still experience problems?

Best wishes,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
william
Top achievements
Rank 1
answered on 29 Apr 2011, 09:38 AM
Hi Peter ,

you are right , i just make a mistake . thanks for your help.

William
Tags
Scheduler
Asked by
william
Top achievements
Rank 1
Answers by
william
Top achievements
Rank 1
Peter
Telerik team
Share this question
or