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

Get Recurrence Appointments By TimeSpan

3 Answers 92 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 19 Sep 2015, 11:04 AM

Hello

I have a problem with recurrence pattern.

Appointments are loaded for a selected timespan (for example April 2015).

The problem is, that I don't see any ​recurrence-​appointments, when the main-​appointments ​are not in the ​selected timespan, because main-appointments are not loaded and therefore the recurrence-appoin​tments by recurrencerule are also not loaded.

How can I detect all ​recurrence-appointments for the selected timespan without loading all the main-appointments?

 

Sincerly

A.Kasar

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 23 Sep 2015, 12:28 PM
Hi Ates,

What we could suggest you is to use the GetOccurrences method of the AppointmentExtensions class that provides the ability to get all the occurrences of a specific Appointment in a DateTime range specified by you - thus you could be able to get all occurrences of the desired main appointment. However, please notice that you still need to have the main Appointment - without it getting the occurrences won't be possible:
//this.Appointments[0] is the main appointment whose occurrences you want to find
var apps = AppointmentExtensions.GetOccurrences(this.Appointments[0], DateTime.Now, DateTime.Now.AddMonths(2));

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alex
Top achievements
Rank 1
answered on 27 Sep 2015, 05:37 PM

Hello Nasko,

Thank your for your answer. That's what I thought.

But now I have another problem. 

I'm set a RecurrenceRule to an appointment (daily for 10 days) and add for day 4 an AppointmentException.

The problem is, that the Scheduler display at this day 2 appointments now. The appointment from the Exception and the appointment from the rule, which should not be shown.

Can you tell me, what I'm doing wrong?

 

Sincerly

A.Kasar

 

0
Nasko
Telerik team
answered on 30 Sep 2015, 11:42 AM
Hi Ates,

Using the provided description we tried to reproduce the observed by you behavior of RadScheduleView, but it seems everything works as expected on our side.

Attached you could find a sample project that demonstrates how to set a RecurrenceRule and apply an Exception for a specific appointment. Please, check it and let us know if it worked for you.

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Alex
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Alex
Top achievements
Rank 1
Share this question
or