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
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
![](/forums/images/avatarimages/default.gif)
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.
.
![](/forums/images/avatarimages/default.gif)
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)
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