Is there a function that can be used to grab the info for the nth occurrence of a recurring appointment...I guess, mainly the date/time info.
3 Answers, 1 is accepted
0
Accepted
Dimitar Milushev
Telerik team
answered on 19 May 2009, 11:49 AM
Hi Matt,
You can parse the Appointment's recurrence rule and iterate over the occurrences until you reach the one you need. Sample code follows:
RecurrenceRule parsedRule = null;
int n = 4;
int index = 0;
if (RecurrenceRule.TryParse(appointment.RecurrenceRule, out parsedRule))
{
foreach (DateTime ocurrenceStart in parsedRule.Occurrences)
{
if (index == n)
{
// this is the fifth ocurrence
}
How can I load an appointment variable if I am on a page separate from the radscheduler page? I saw a findbyid() function in client-side...is there a similar function for server-side?
0
T. Tsonev
Telerik team
answered on 21 May 2009, 11:22 AM
Hi Matt,
You'll need a reference to the RadScheduler in order to obtain information about the loaded appointments. You can use the Appointments.FindByID method in this case.
Alternatively, you can read the appointment data directly from the data source and use the technique from my colleagues reply to evaluate the recurrence rules. You'll then be able to construct a full list of the appointments without having a RadScheduler instance.