How to prevent event overlapping
Last revision: Dec 14, 2010
At this moment it's only possible to prevent the event overlaps on the server side.
- Typically, the check will need to be done in EventResize, EventMove. Depending on how you create the new events you might need to add it to TimeRangeSelected, TimeRangeMenuClick, TimeRangeDoubleClick, and Command.
- You can use the following SQL select to check the new date: Testing for Overlapping Events with SQL
- If the new/updated event doesn't meet the criteria, you should deny the action (don't update the DB) and notify the user using UpdateWithMessage(msg):
Event handler (.aspx.cs file):
DayPilotScheduler1.UpdateWithMessage("This action is not allowed (overlapping events)");This technique is also demonstrated in the Hotel Room Booking Scheduler Tutorial.
Related