Drag and Drop Customization
- 2 minutes to read
The Scheduler control provides options and events that allow you to control drag-and-drop operations.
|SchedulerControl.AllowAppointmentDrag||Controls the end-user’s capability to drag and drop appointments to another location (time slot or date). You can override this global behavior by handling the SchedulerControl.CustomAllowAppointmentDrag event.|
|SchedulerControl.AllowAppointmentDragBetweenResources||Allows you to restrict dragging appointments to another resource area only.|
|SchedulerControl.AllowAppointmentConflicts||Allows you to restrict dragging appointments to the time interval another appointment occupies.|
|SchedulerControl.AppointmentDragMode||Specifies how an appointment fits in the time cell(s) when dragging it to another time interval.|
|SchedulerControl.KeepResourceDistanceOnAppointmentDrag||Specifies whether to keep a relative interval measured in visual resources between appointments while they are dragged.|
The SchedulerControl.AppointmentDrag event occurs when the end-user drags an appointment over the SchedulerControl. Use this event to specify whether the end-user can drag or drop appointments along the time cells.
The SchedulerControl.CustomAllowAppointmentDrag event fires when the end-user attempts to drag the appointment to another time interval. Use this event to specify a particular case when the end-user can drag an appointment. If you do not specify the behavior manually, the SchedulerControl.AllowAppointmentDrag property manages whether end-users can drag appointments.
The SchedulerControl.CustomAllowAppointmentDragBetweenResources event fires when the end-user attempts to drag the appointment. Use this event to specify a particular case when the end-user can drag an appointment to another resource’s area. If you do not specify the behavior manually, the SchedulerControl.AllowAppointmentDragBetweenResources property manages whether end-users can drag appointments.
Currently the SchedulerControl does not provide a property or event that specifies whether to keep the original appointment in the SchedulerControl at the end of a drag-and-drop operation. To preserve an appointment after dropping it into a GridControl, set the DragEventArgsBase.Effects property of the grid’s DropRecord event to DragDropEffects.Link.