How to add new period to recurrence

6 posts, 0 answers
  1. Leszek
    Leszek avatar
    8 posts
    Member since:
    Jan 2009

    Posted 23 Feb 2009 Link to this post

    Hello,
    I need to add new period to recurrence : "every 3 month"?
    Could you help me how I can do it?
    Regards.
    Leszek
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 25 Feb 2009 Link to this post

    Hello Leszek,

    You can easily create a MonthlyRecurrenceRule with code as shown bellow:
    DateTime date = new DateTime(2007, 4, 1); 
    TimeSpan time = new TimeSpan(11, 35, 0); 
    DateTime start = date.Add(time); 
     
    RecurrenceRule rrule = new MonthlyRecurrenceRule(start, 2, 4, 3); 

    In the above example day of month = 2, interval = 4 and count = 3 which gives a monthly recurrence rule with occurrences on the second day of every 4th month, 3 times.

    You could also take a look at this help article:
    http://www.telerik.com/help/winforms/working_with_recurring_appointments.html

    Best wishes,
    Jordan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Pham
    Pham avatar
    17 posts
    Member since:
    Mar 2009

    Posted 26 Mar 2009 Link to this post

    Hi,

    The article and the code you provided probably for the older version.

    Since I tried that but it said that can't find the HourlyRecurrenceRule class. And The article you pointed us to says that can't instantiate the RecurrenceRule
    But from the CHM help file there is:
    //Setting recurrence rule to appointment
               
    appointment.RecurrenceRule = new RecurrenceRule( pattern );


    Furthermore using this new CHM file I can't set a pattern frequency to Minitely or Hourly, etc only Daily and up are supported.

    Can you guide us how to make Hourly, minutely, etc appointment.

    Thank you.

    Pham Van Vung - Arthur.
    www.online-emark.com


  4. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 30 Mar 2009 Link to this post

    Hello Pham,

    All recurrence rules are in the Telerik.WinControls.UI namespace. Just add a using declaration - using Telerik.WinControls.UI - and you should be able to find them. Are you sure that this CHM that you refer to is for the WinForms scheduler? The ASP.NET scheduler has such things as patterns, and the WinForms one does not.

    Sincerely yours,
    Jordan
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Pham
    Pham avatar
    17 posts
    Member since:
    Mar 2009

    Posted 17 Apr 2009 Link to this post

    Hi,

    Thx, I was confused. Mine is the WPF one. And so far, I think it doesn't support yet.

    Do you know, whether you are about to support those features?

    Thank you.
  6. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 20 Apr 2009 Link to this post

    Hi Pham,

    We will consider your proposals for the next major release. At the moment you can set a recurrence rule to an appointment. Here is sample code demonstrating how to create hourly recurrence rule an set it to an appointment.

        Appointment recurringAppointment = new Appointment(new DateTime(2008, 10, 1, 3, 30, 0), 
                           TimeSpan.FromHours(1.0), "Appointment Subject"); 
     
                     // Create a recurrence rule to repeat the appointment every 2 hours for 10 occurrences. 
                     HourlyRecurrenceRule rrule = new HourlyRecurrenceRule(recurringAppointment.Start, 2, 10); 
                     
                     //Assign the hourly recurrence rule to the appointment 
                     recurringAppointment.RecurrenceRule = rrule; 
     

    Please contact me again if you have additional questions regarding RadScheduler.

    Sincerely yours,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top