
Roger McCoy
Top achievements
Rank 1
Roger McCoy
asked on 27 Jul 2010, 05:37 PM
I guess it's debatable whether this is the desired behaviour, but I noticed that when I use SetEffectiveRange it only accounts for the start date, not the end date. To use a quick, realistic example, let's say we have an office that blocks off the time when they're closed with a recurring appointment from 5 PM to 8 AM. If I parse all of the appointments on a given day, I get the equivalent of:
8 AM - 9 AM - Early appointment
12 PM - 1 PM - Lunch
5 PM - 8 AM tomorrow - Office closed
But I don't get:
5 PM yesterday - 8 AM today - Office closed
Similarly, if an appointment runs from Monday to Wednesday and I use SetEffectiveRange to show Tuesday's appointments, the effective "all day" appointment doesn't show. I can work around this easily enough by setting a wider range and filtering with an If statement, but I don't know if this is considered the expected behaviour for this function.
8 AM - 9 AM - Early appointment
12 PM - 1 PM - Lunch
5 PM - 8 AM tomorrow - Office closed
But I don't get:
5 PM yesterday - 8 AM today - Office closed
Similarly, if an appointment runs from Monday to Wednesday and I use SetEffectiveRange to show Tuesday's appointments, the effective "all day" appointment doesn't show. I can work around this easily enough by setting a wider range and filtering with an If statement, but I don't know if this is considered the expected behaviour for this function.
5 Answers, 1 is accepted
0
Hi Roger,
How do you parse all of the appointments? Have you used approach similar to the one from this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx
Another helpful resource is the help topic on Working with Recurring Appointments.
With the information you provided, we cannot say for sure if this is a bug or expected behavior. Anyway, we appreciate your feedback on this.
Best wishes,
Peter
the Telerik team
How do you parse all of the appointments? Have you used approach similar to the one from this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx
Another helpful resource is the help topic on Working with Recurring Appointments.
With the information you provided, we cannot say for sure if this is a bug or expected behavior. Anyway, we appreciate your feedback on this.
Best wishes,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0

Roger McCoy
Top achievements
Rank 1
answered on 19 Aug 2010, 04:42 AM
Same basic principle. I guess my point is that it will parse whether an appointment is inside the range based on the start date but not the end date. So if an appointment starts prior to the range but ends during (or even after) the range, it doesn't appear to be included. Sample code snippet below.
If Len(appt.Recurrence) > 0 Then
Dim parsedRule As RecurrenceRule
Dim apptLength As Integer = DateDiff(DateInterval.Minute, appt.Time, appt.TimeEnd)
Telerik.Web.UI.RecurrenceRule.TryParse(appt.Recurrence, parsedRule)
parsedRule.SetEffectiveRange(LowDate.AddMinutes(-apptLength), HighDate)
Dim occurrence As DateTime
For Each occurrence In parsedRule.Occurrences
Dim Item As New TimeSlotDesc
Item.Room = appt.Room
Item.RoomName = appt.RoomName
Item.Time = occurrence
Item.TimeEnd = occurrence.AddMinutes(apptLength)
AppointmentList.Add(Item)
Next occurrence
End If
0
Hello Roger,
That's actually what we do in RadScheduler - we subtract one appointment duration from the range start, so we can handle the case you describe.
I agree with you - the best place to address this issue is to fix the SetEffectiveRange method. I've logged this issue.
As a token of gratitude for your involvement your Telerik points have been updated.
Best wishes,
Tsvetomir Tsonev
the Telerik team
That's actually what we do in RadScheduler - we subtract one appointment duration from the range start, so we can handle the case you describe.
// The effective range start is adjusted with one appointment duration,
// so we can include the recurring appointments that are starting
// in the previous period and span into the current one.
rrule.SetEffectiveRange(visibleRangeStart - parent.Duration, visibleRangeEnd);
I agree with you - the best place to address this issue is to fix the SetEffectiveRange method. I've logged this issue.
As a token of gratitude for your involvement your Telerik points have been updated.
Best wishes,
Tsvetomir Tsonev
the Telerik team
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 Public Issue Tracking
system and vote to affect the priority of the items
0

Rohit Aggarwal
Top achievements
Rank 1
answered on 23 Aug 2011, 12:19 AM
Has this bug fixed for SetEffectiveRange method ?
0
Hi Rohit,
Thank you for your interest, but unfortunately, this issue has been postponed.
All the best,
Peter
the Telerik team
Thank you for your interest, but unfortunately, this issue has been postponed.
All the best,
Peter
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>