New to Telerik UI for WinFormsStart a free 30-day trial

AppointmentDraggingBehavior

Updated over 6 months ago

RadScheduler handles the whole drag and drop operation by its AppointmentDraggingBehavior. It exposes the following public properties, methods and events:

Properties

PropertyDescription
AutoScrollDayViewOnDragGets or sets a value indicating whether the appointment areas in DayView should be automatically scrolled when dragging off their bounds.
ShowCreateExceptionDialogGets or sets a value indicating whether a prompt dialog box should be shown when the user is about to create occurrence exception via drag and drop.
DragNavigationOffsetGets or sets the offset from the bounds of the control in pixels after which the automatic view navigation will be triggered.
DragNavigationIntervalGets or sets the minimum time interval between automatic view navigations.
SchedulerThe RadScheduler that owns the behaviors.
IsDraggingIndicates whether there is an active drag operation.
ActiveOwnerGets the behavior's active owner.
ActiveFeedbackGets the active feedback.

Methods

MethodDescription
MoveFeedbackMoves the active feedback to a new owner.
DoDragOverHandles dragging the active feedback to a given point.
IsRealDragGets whether this is a valid drag operation.
IsElementOwnerGets whether the element is found in the owners collection.
GetFeedbackGets a specific feedback.
BeginDragRequest move operation.
RemoveFeedbackRemoves the visual feedback. Cancels the drag operation.
DropHandles the Drop operation.
MoveMoves the feedback to a specific date in a specific resource.
AddToOwnerCollectionAdds the active feedback to the active owner.
CreateFeedbackCreates a new appointment feedback of a given appointment.

Events specific only for the AppointmentDraggingBehavior

EventDescription
FeedbackCreatingOccurs when the feedback is creating.
FeedbackInitializedOccurs when the feedback is initialized.
AppointmentMovingOccurs when an appointment is moving.
AppointmentMovedOccurs when an appointment is moved.
AppointmentDroppingOccurs when drag drop is finishing.
AppointmentDroppedOccurs when drag drop has finished.

By default, RadScheduler allows you to reorder the Appointments into the view either in bound or unbound mode. It is accomplished by the AppointmentDraggingBehavior. If you need to customize the default drag and drop behavior you can handle the relevant events. As a descendant of RadDragDropService, AppointmentDraggingBehavior handles the whole drag and drop operation. The PreviewDragOver event allows you to control on what targets the appointment being dragged can be dropped on. The PreviewDragDrop event allows you to get a handle on all the aspects of the drag and drop operation, the source (drag) RadScheduler, the destination (target) control, as well as the AppointmentElement being dragged. This is where we will initiate the actual physical move of the appointment(s) from one scheduler to the target control. A sample implementation is demonstrated in the Drag and Drop Using RadDragDropService help article.

See Also