How to delete one exception occurence issued from recurrence ?

3 posts, 0 answers
  1. luc bonenfant
    luc bonenfant avatar
    53 posts
    Member since:
    Sep 2007

    Posted 23 Aug 2015 Link to this post


    1. I create an appointment with recurrence : 3 occurrences A,B,C.
    2. I update only one occurrence : B.
    3. I delete B.

    But deleting B doesn't work... indeed, no event is firing... (none from OnOccurrenceDelete​/OnAppointmentDelete/Delete method from provider)
    More, if i try to edit this occurrence B, i can choose series/occurrence illogically (and nothing happen if i choose edting series...) 

    If I update series from A or B to reset exception, the original B takes place, but my "orphan" occurrence B always exists and i still can not delete it.
    The own way for user to delete orphan B is to add a reccurence to B then deleting the series...

    Is it something i didn't understand ? ​How to force the removal of B please ?

  2. Nencho
    Nencho avatar
    1661 posts

    Posted 26 Aug 2015 Link to this post

    Hello Luc,

    Could you demonstrate us the implementation of the RadScheduler that you use at your and, along with the data-binding approach that you use. This we could get a clearer picture on your implementation and try to replicate the experienced issue.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. luc bonenfant
    luc bonenfant avatar
    53 posts
    Member since:
    Sep 2007

    Posted 29 Aug 2015 Link to this post

    In fact, i deleted this code from GetAppointments ​into the provider :

    if (apt.RecurrenceParentID != null)
       apt.RecurrenceState = RecurrenceState.Exception;

     Because, for me, this ocurrence (previously moved from series) is now with a type NotRecuring.
    And it's working great like this.

    The original code is here :

    To answer to you previous post, this is a part of my code for the GetAppointments method :

    public override IEnumerable<Appointment> GetAppointments(RadScheduler owner)
        List<Appointment> appointments = new List<Appointment>();
        List<CAppointmentInfo> appointmentInfos = new List<CAppointmentInfo>();
        List<CAppointmentInfo> uniqueAppointmentInfos = AppointmentInfos.Where(x => x.Start >= owner.VisibleRangeStart && x.End <= owner.VisibleRangeEnd && x.RecurrenceRule == string.Empty).ToList();
        List<CAppointmentInfo> recurrenceAppointmentInfos = AppointmentInfos.Where(x => x.RecurrenceRule != string.Empty).ToList();
        foreach (CAppointmentInfo appointmentInfo in appointmentInfos)
            Appointment apt = new Appointment();
            apt.Owner = owner;
            apt.ID = appointmentInfo.ID;
            apt.Subject = appointmentInfo.Subject;
            apt.Start = DateTime.SpecifyKind(appointmentInfo.Start, DateTimeKind.Utc);
            apt.End = DateTime.SpecifyKind(appointmentInfo.End, DateTimeKind.Utc);
            apt.RecurrenceRule = appointmentInfo.RecurrenceRule;
            apt.RecurrenceParentID = appointmentInfo.RecurrenceParentID;
            if (appointmentInfo.Reminder != null)
                IList<Reminder> reminders = Reminder.TryParse(appointmentInfo.Reminder);
                if (reminders != null)
            if (apt.RecurrenceRule != string.Empty)
                apt.RecurrenceState = RecurrenceState.Master;
            LoadResources(appointmentInfo, apt);
        return appointments;

Back to Top