Get Recurrence Appointments By TimeSpan

4 posts, 0 answers
  1. Ates
    Ates avatar
    15 posts
    Member since:
    Nov 2010

    Posted 19 Sep 2015 Link to this post

    Hello

    I have a problem with recurrence pattern.

    Appointments are loaded for a selected timespan (for example April 2015).

    The problem is, that I don't see any ​recurrence-​appointments, when the main-​appointments ​are not in the ​selected timespan, because main-appointments are not loaded and therefore the recurrence-appoin​tments by recurrencerule are also not loaded.

    How can I detect all ​recurrence-appointments for the selected timespan without loading all the main-appointments?

     

    Sincerly

    A.Kasar

  2. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 23 Sep 2015 Link to this post

    Hi Ates,

    What we could suggest you is to use the GetOccurrences method of the AppointmentExtensions class that provides the ability to get all the occurrences of a specific Appointment in a DateTime range specified by you - thus you could be able to get all occurrences of the desired main appointment. However, please notice that you still need to have the main Appointment - without it getting the occurrences won't be possible:
    //this.Appointments[0] is the main appointment whose occurrences you want to find
    var apps = AppointmentExtensions.GetOccurrences(this.Appointments[0], DateTime.Now, DateTime.Now.AddMonths(2));

    Hopes this helps.

    Regards,
    Nasko
    Telerik
    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. UI for WPF is Visual Studio 2017 Ready
  4. Ates
    Ates avatar
    15 posts
    Member since:
    Nov 2010

    Posted 27 Sep 2015 Link to this post

    Hello Nasko,

    Thank your for your answer. That's what I thought.

    But now I have another problem. 

    I'm set a RecurrenceRule to an appointment (daily for 10 days) and add for day 4 an AppointmentException.

    The problem is, that the Scheduler display at this day 2 appointments now. The appointment from the Exception and the appointment from the rule, which should not be shown.

    Can you tell me, what I'm doing wrong?

     

    Sincerly

    A.Kasar

     

  5. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 30 Sep 2015 Link to this post

    Hi Ates,

    Using the provided description we tried to reproduce the observed by you behavior of RadScheduleView, but it seems everything works as expected on our side.

    Attached you could find a sample project that demonstrates how to set a RecurrenceRule and apply an Exception for a specific appointment. Please, check it and let us know if it worked for you.

    Hopes this helps.

    Regards,
    Nasko
    Telerik
    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
Back to Top