This is a migrated thread and some comments may be shown as answers.

customization of Recurrence Appointments

4 Answers 97 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jose
Top achievements
Rank 1
Jose asked on 15 Jul 2019, 04:22 PM

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.

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Jul 2019, 06:47 AM
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.
0
Jose
Top achievements
Rank 1
answered on 21 Jul 2019, 07:26 AM

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.
.

0
Jose
Top achievements
Rank 1
answered on 21 Jul 2019, 07:28 AM

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)

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Jul 2019, 12:07 PM
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.
Tags
Scheduler and Reminder
Asked by
Jose
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jose
Top achievements
Rank 1
Share this question
or