Just I am starting the evaluation of your control, but i have a big question: Is it possible to avoid the overlapping of 2 appointments ?
It's means that when the user finish the drag&drop of the one of them, the control returns it to the original position, if it drops inside the time interval of the second (avoiding the overlapping each other)...
I need this feature in my application because my real cases can't be happening at the same or parallel time.
Thanks for your help.
29 Answers, 1 is accepted
Hi Humberto,
Thank you for using RadScheduler.
You can reduce the value of the MinutesPerRow property which by default is 30. Try for example:
MinutesPerRow ="15". Let us know how it goes.
Kind regards,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

It occurred to me that you may be asking for for different functionality than what I initially thought. If you want to limit the number of simultaneous appointments so that only one appointment is allowed per time slot, please, use the following code:
protected void RadScheduler1_AppointmentInsert(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e) |
{ |
if (RadScheduler1.Appointments.GetAppointmentsInRange(e.Appointment.Start, e.Appointment.End).Count > 0) |
{ |
e.Cancel = true; |
} |
} |
protected void RadScheduler1_AppointmentUpdate(object sender, Telerik.Web.UI.AppointmentUpdateEventArgs e) |
{ |
if (RadScheduler1.Appointments.GetAppointmentsInRange(e.ModifiedAppointment.Start, e.ModifiedAppointment.End).Count > 0) |
{ |
foreach (Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(e.ModifiedAppointment.Start, e.ModifiedAppointment.End)) |
{ |
if (a.ID != e.Appointment.ID) |
{ |
e.Cancel = true; |
} |
} |
} |
} |
All the best,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

great... we'll buy the suite... i said to my boss...
obviously, the solution was the second reply from you...

This is the default behavior of RadScheduler - it supports multiple simultaneous appointments. Please, refer to the attached screenshot and the online examples.
If there is something specific around your case which causes different behavior of RadScheduler than the expected one, please elaborate and we will see to it.
Cheers,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

I am having essentially the same problem. In most cases, when times for appointments overlap, the appointments are rendered in RadScheduler side-by-side. However, when the appointments have exactly the same start and end times, they are rendered on top of each other, with only one visible. As far as I can tell, there is no way for users to know that multiple appointments are present - practically speaking, the information just disappears.
This behavior is less than ideal, at best. A few seconds difference in the start or end times between two appointments, and they render side-by-side, but if the times are the same, all disappear except one.
Is there any good way around this? Thanks for your help.
You are correct, appointments with exactly same start and end time (zero duration) overlap in the latest official release. The issue is already resolved in the latest builds. You can open a formal support ticket to request a hotfix or you can wait a few days, as the SP2 release is scheduled for the end of this week. Sorry for the inconvenience.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

I can wait a few days for the official SP release. I worked out a temporary fix for my scenario on my own, but I look forward to the update.

I have a scheduling application where I have lots of concurrent appointments that do not run in traditional time blocks. An example might be as follows:
1:00-1:23
1:23-1:42
1:42-2:18
2:18-2:25
When I use the scheduler it is showing them side by side, but its a little misleading since they are really one after another. We tried setting it to 1 minute interval with 1 pixel each, but it really didn't work. Somehow we want to make them look like they each happen after another without the entire day being very long vertically.
Is there any way to make the RAD Scheduler do this? I saw the DayPilot demo (which is not as good of a tool), but it does do this particular function. What am I doing wrong here?
Thanks.

I'm having the exact same issue - need to have two appointments that meet at the same unusual time (i.e. 9:46).
I tried doing 5 minute blocks, though I can't then get the RowHeight to a sufficiently low value (14px is the current min I believe) for this to be useful.
Any thoughts from the Telerik team?
Lucas
We plan to implement exact time rendering of appointments probably for Q2 2010.
Kind regards,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I tried the code extract for Avoiding the overlap of 2 appointments, and found the following line does not work:
foreach (Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(e.ModifiedAppointment.Start, e.ModifiedAppointment.End))
As it does not recognise or accept the the underlined part of the line above. It says the following: "The type of namespace name 'Appointment' could not be found (are you missing a using derictive or an assembly reference?)".
Also I set the MinutesPerRow property to 15, however the dropdown list of timeslots in the AdvancedEditForm for a new/existing appointment show time at 30minute intervals instead of 15. How do I change this?

did you include the Telerik.Web.UI namespace?
using Telerik.Web.UI in C#
Imports Telerik.Web.UI in VB

Example
On Tuesday there is a single appointment that occurs between 09:15 and 11:15, the next appointment is created on Monday with a start time of 10:30 to 12:30 for example, but with the recurring information as daily for the next three days, creating a conflict with the Tuesday appointment, however when you call RadScheduler1.Appointments.GetAppointmentsInRange(e.Appoinment.Start, e.Appointment.End) the count is 0, I also checked GetAppointmentsEnclosingRange and GetAppointmentsStartingInRange but they also return 0.
Any suggestions...
This is expected, because in your code -
RadScheduler1.Appointments.GetAppointmentsInRange(e.Appoinment.Start, e.Appointment.End) ,
e.Appoinment is the master appointment which is on Monday and it does not conflict with any appointments on Tuesday or the days after. To handle recurring appointments and to ensure that occurrences do not conflict, you need to parse the recurrence rule and check each occurence individually if it creates conflicts with other appointments. Here are a kb article and a help topic on enumerating occurrences:
http://www.telerik.com/help/aspnet-ajax/schedule_serversideworkingwithrecurringappointments.html
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx
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.

Thanks for the idea, seem to have got it working,
Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert |
Dim r As RecurrenceRule |
Dim d As DateTime |
If e.Appointment.RecurrenceState = RecurrenceState.Master Then |
RecurrenceRule.TryParse(e.Appointment.RecurrenceRule.ToString, r) |
For Each d In r.Occurrences |
If RadScheduler1.Appointments.GetAppointmentsInRange(d, d.Add(e.Appointment.Duration)).Count Then |
e.Cancel = True |
End If |
Next |
ElseIf e.Appointment.RecurrenceState <> RecurrenceState.Occurrence Then |
If RadScheduler1.Appointments.GetAppointmentsInRange(e.Appointment.Start, e.Appointment.End).Count Then |
e.Cancel = True |
End If |
End If |
If e.Cancel Then RadAjaxManager1.Alert("Apointment Overlaps Another") |
End Sub |
Hope this helps someone else....
Adam

Protected Sub Diary_RecurrenceExceptionCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.RecurrenceExceptionCreatedEventArgs) Handles Diary.RecurrenceExceptionCreated |
Dim a As Appointment |
For Each a In RadScheduler1.Appointments.GetAppointmentsInRange(e.ExceptionAppointment.Start, e.ExceptionAppointment.End) |
Try |
If a.ID <> e.Appointment.ID Then |
e.Cancel = True |
End If |
Catch |
If a.RecurrenceParentID <> e.Appointment.ID Then |
e.Cancel = True |
End If |
End Try |
Next |
If e.Cancel Then RadAjaxManager1.Alert("Appointment Overlaps Another") |
End Sub |
Hope this helps someone...

Last december, Peter from the Telerik team was writing "We plan to implement exact time rendering of appointments probably for Q2 2010"... but we made a test with the Q2 and we still have the same issue.
An event starting at 10:05 and ending at 11:05 renders in the RadScheduler from 10:00 to 11:15, which is not accurate at all.
Furthermore if we plan a second envent starting at 11:05 (or even 11:06), the RadScheduler shows it next from the first, as if it were simultaneous while it's a later event.
(for this test we set the DayStartTime of the RadScheduler to 8:00 and the MinutesPerRow to 15 min., which seems to be the minimum possible value).
Is there really a solution with the Q2 ? Or another way to use the control in order to obtain a proper display ? It gets really annoying...
Thanks in advance,
Daniel
Unfortunately, we had to postpone implementation of this feature. We are not sure we will be able to support it for all view types. A realistic commitment would be to implement exact time rendering for Timeline view for Q3 2010.
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.

sorry to post in an old thread but how do i make sure there are no overlapping appointments for a specific time range AND by resource.
example: i can have two appointments at 1 PM if they are for different rooms but only 1 appointment per room at a time.
in my case, the radscheduler is only available for people to see availability. the appointment details are captured in a form and then programmatically entered into the calendar only to verify that an appoint doesnt already exist, currently, i can check if any appointments exist at all but not by resource.
protected
bool
ExceedsLimit(Appointment apt)
{
int
appointmentsCount = RadScheduler1.Appointments.GetAppointmentsInRange(apt.Start, apt.End).Count;
return
(appointmentsCount > 0);
}
protected
void
btnContinue_Click(
object
sender, System.EventArgs e)
{
var newAppointment =
new
Appointment();
newAppointment.Start = (Convert.ToDateTime(rdtpReserveStart.SelectedDate.ToString()));
newAppointment.End = (Convert.ToDateTime(rdtpReserveEnd.SelectedDate.ToString()));
newAppointment.Subject = txtName.Text;
if
(ExceedsLimit(newAppointment))
{
RadAjaxManager1.Alert(
"An existing reservation conflicts with the time you have specified"
);
}
else
{
...
}
}
that above will check if an appointment exists in the time range but cant filter by resource
i have seen the tutorial for the javascript way of doing it but i rather avoid that, unless someone has a good reason for why it may be more efficient.
You'll have to iterate over the resources of each appointment returned by Appointments.GetAppointmentsInRange to see if they match the resources for the new appointment.
// Pseudo-code
foreach
(Appointment existingApt
in
GetAppointmentsInRange(...))
{
foreach
(Resource existingRes
in
existingApt.Resources)
{
if
(apt.Resources.GetResource(existingRes.Type, existingRes.Key) !=
null
)
{
// Conflict
}
}
}
I hope this helps.
All the best,
Tsvetomir Tsonev
the Telerik team

Sorry again to resurrect an old thread, but exact time rendering of appointments is something that is very important to me as well. I've had a look at the Q3 2010 roadmap and there doesn't seem to be any mention of exact rendering in there - has this feature been pushed back again? If not, I think I may be able to get what I am after by setting MinutesPerRow to 1, then fiddling around with the stylesheets to make the row heights only 1 px, but I then have the issue of not being able to line up the hours column (without also setting that font height to 1px, which makes it unreadable). Can you tell me if a Telerik Premium Collection for .NET license would contain the source code to enable me to modify this myself?
Thanks for your help.

i was actually able to achieve the effect by adding the CustomAttributeNames="RoomTypeID" to the RadScheduler and then inserting appointments with the Custom Attribute specified
protected
bool
ExceedsLimit(Appointment apt)
{
var appointments = rsReservations.Appointments.GetAppointmentsInRange(apt.Start, apt.End);
int
appointmentsCount = 0;
foreach
(Appointment existingApt
in
appointments)
{
if
(existingApt.Attributes[
"RoomTypeID"
].ToString() == apt.Attributes[
"RoomTypeID"
].ToString())
appointmentsCount++;
}
return
(appointmentsCount > 0);
}
Yes, this will work too, great.
Matthew, the exact time rendering was not included in the original roadmap, but we've managed to implement it for Day and Week view. The Q3 Beta is coming in a week or so and you'll be able to test it yourself. Here's a little teaser:

Have a great day!
Regards,
Tsvetomir Tsonev
the Telerik team


Thanks for all your help
You can insert html in RadScheduler's header using jQuery similarly to the way this is done here.
For a client side validation for overlapping appointments please use this demo as reference.
Greetings,
Peter
the Telerik team
