Hi David ,
that you have used for reference relies on that RadScheduler is grouped by a resource type. If it is not, then slot.get_resource will be undefined
. You can improve the code to automatically resolve the case when RadScheduler is not grouped by a resource type with a simple condition like this:
isRoomOccupied(scheduler, start, end, slot, appointment)
//get the "Room" resource associated with the time slot
currentRoom = slot.get_resource();
//get all appointments for this "room" in the specified period
appointmentsForThisRoom = getAppointmentsInRangeByResource(scheduler, start, end, currentRoom, appointment);
//if the list of appointments is not empty there are other appointments in this slot
appointmentsForThisRoom.get_count() > 0;
Feel free to contact us again if you still experience any issues.
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!