SchedulerControl.StartAppointmentDragFromOutside Event

Occurs when the user drags an object in the Scheduler from an external source.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v21.2.dll


public event StartAppointmentDragFromOutsideEventHandler StartAppointmentDragFromOutside

Event Data

The StartAppointmentDragFromOutside event's data class is DevExpress.Xpf.Scheduling.StartAppointmentDragFromOutsideEventArgs.


The CompleteAppointmentDragDrop event does not fire if the drag-drop operation has been initialized outside the Scheduler.

The example below illustrates how to implement drag-drop from a text editor and GridControl.

 private void Scheduler_StartAppointmentDragFromOutside(object sender,
  StartAppointmentDragFromOutsideEventArgs e) {

  // if the user is dragging GridControl data
  if (e.Data.GetDataPresent(typeof(RecordDragDropData))) {
    var rddData = (RecordDragDropData) e.Data.GetData(typeof(RecordDragDropData));
    foreach (var appData in rddData.Records.Cast<AppointmentData>()) {
      var appointment = new AppointmentItem {
        Subject = appData.Subject,
        Location = appData.Location
      appointment.End = appointment.Start + appData.Length;

  // if the user is dragging text
  if (e.Data.GetDataPresent(typeof(string))) {
    var subject = (string) e.Data.GetData(typeof(string));
    var appointment = new AppointmentItem { Subject = subject };
See Also