customization of Recurrence Appointments

5 posts, 0 answers
  1. Jose
    Jose avatar
    8 posts
    Member since:
    Jun 2019

    Posted 15 Jul 2019 Link to this post

    Hello.

    I'm considering using Scheduler but I need to customize recurring appointments in a way that I do not know how to do it.

    I need recurring appointments to occur only within an interval.

    For example, in a HourlyRecurrence Appointment I'd need only repeat in the interval from 10:00 to 17:00 hours

    or in a Daily appointment that only ocurs between 5th and 25th of each month.

    Would this be possible?

    Thx.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3952 posts

    Posted 16 Jul 2019 Link to this post

    Hello, Jose,  

    RadScheduler offers adding recurrence rules to an appointment on minutely, hourly, weekly, daily, monthly and yearly basis. Exceptions to the recurrence rules are also permitted. For example, when you define an HourlyRecurrenceRule, you can specify the occurrence interval and the number of occurrences. If you need to skip some hours, you can simply add an exception. Please refer to the below code snippet:

    public RadForm1()
    {
        InitializeComponent();
     
        Appointment a = new Appointment(DateTime.Today.AddHours(8), TimeSpan.FromMinutes(20),"Test");
        this.radScheduler1.Appointments.Add(a);
        radScheduler1.Appointments[0].RecurrenceRule = new HourlyRecurrenceRule(DateTime.Now, 1, 10);
     
        int cnt = 0;
        IEvent exception= this.radScheduler1.Appointments[0].Occurrences.First();
        foreach (IEvent e in radScheduler1.Appointments[0].Occurrences)
        {
            if (cnt == 4)
            {
                exception= e;
                exception.Visible = false;
                break;
            }
            cnt++;
        }
        radScheduler1.Appointments[0].Exceptions.Add(exception);
    }

    Additional information how to work with recurring appointments is available in the following help articles: 
    https://docs.telerik.com/devtools/winforms/controls/scheduler/appointments-and-dialogs/working-with-recurring-appointments 
    https://docs.telerik.com/devtools/winforms/controls/scheduler/appointments-and-dialogs/recurrence-rule-walkthrough

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Jose
    Jose avatar
    8 posts
    Member since:
    Jun 2019

    Posted 21 Jul 2019 Link to this post

    thank you very much.

    I'm trying to do a test to see how it would be but I have some more doubt.

     I need an Appointment with MinutelyRecurrenceRule that ocurrs every 3 minutes, but the MinutelyRecurrenceRule builder has no parameters, how could I do it?

    On the other hand I added a reminder to the appointment but only get that it's shows the first time, the following ones of the recurring Appointment do not show the alert.

    how could I do it?

     

    Thx againg for your help.
    .

  4. Jose
    Jose avatar
    8 posts
    Member since:
    Jun 2019

    Posted 21 Jul 2019 in reply to Jose Link to this post

    I'm just do it:

            Dim a As New Appointment(New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, 0).AddMinutes(1),
                                     New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, 0).AddMinutes(2), "prueba")
            schedu.Appointments.Add(a)
            schedu.Appointments(0).RecurrenceRule = New MinutelyRecurrenceRule()
            r.TimeInterval = 1000
            r.AddRemindObject(a)
            r.StartReminder()

            a.Reminder = New TimeSpan(1)

  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3952 posts

    Posted 23 Jul 2019 Link to this post

    Hello, Jose, 

    You can find below a sample code snippet demonstrating how to add a MinutelyRecurrenceRule to an Appointment:

    Dim a As New Appointment(New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, 0).AddMinutes(1),
                            New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, 0).AddMinutes(2), "prueba")
    Me.RadScheduler1.Appointments.Add(a)
     
    Dim rrule As MinutelyRecurrenceRule = New MinutelyRecurrenceRule()
    rrule.Start = a.Start
    rrule.Interval = 2
    rrule.Count = 5
    Me.RadScheduler1.Appointments(0).RecurrenceRule = rrule

    As to the reminder, please refer to the following help article which demonstrates how to add reminders to an Appointment: https://docs.telerik.com/devtools/winforms/controls/scheduler/reminders/radschedulerreminder

    Our Demo application >> Scheduler >> Reminder example is also quite useful on this topic.
     
    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top