Exceptions in a recurrence rule

5 posts, 0 answers
  1. Matt
    Matt avatar
    24 posts
    Member since:
    Dec 2012

    Posted 20 Dec 2012 Link to this post

    I was wondering how exactly exceptions are stored.  In the master event's recurrence rule? 

    For example, if I had deleted an occurrence of a recurring appointment, how would that be stored in a database?  Maybe something like DELETEDDATES=ddMMyyyy in the recurrence rule?

    Thanks!
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 21 Dec 2012 Link to this post

    Hi Matt,

    Thank you for your question.

    The exceptions are stored as separate appointments in their MasterEvent's Exceptions collection. In the database they are stored as separate records with a pointer to their MasterEvent's id. Deleted occurrences are stored as exception appointments with Visible = false. Therefore, it is important to map the MasterEventId and the Visible properties when binding the scheduler in order to support exceptions.

    I hope you find this useful. Please let me know if you have any additional questions.

    Greetings,
    Ivan Todorov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Matt
    Matt avatar
    24 posts
    Member since:
    Dec 2012

    Posted 24 Dec 2012 Link to this post

    Thank you for your answer!

    Is it possible to programmitically create a collection of exceptions and set an Appointment's exception list to the programmatically-created list?

    Thanks!
  5. Allen
    Allen avatar
    14 posts
    Member since:
    Aug 2012

    Posted 27 Dec 2012 Link to this post

    foreach (Appointment App in radScheduler.Appointments)
    {
        foreach (IEvent item in App.Exceptions)
        {
            //do your stuff here
        }
    }

    @Matt

    Programatically you say? well, i think here's one way (and i know that there is a better one), i just used the existing RadScheduler control in my form to give me ALL of the appointments bound in the control, then i can just iterate through the exceptions like so. Though this is slower. Make sure that you have filled the data source of your RadScheduler first.
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 27 Dec 2012 Link to this post

    Hello Matt,

    Thank you for writing back.

    Yes, it is possible to do that. You need to add them to the Exceptions collection of the MasterEvent and set their MasterEvent as well.

    I hope this helps.
     
    Kind regards,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top
UI for WinForms is Visual Studio 2017 Ready