Version

AppointmentsDragDrop Event

Event fired when a drag drop operation on an appointment or group of appointments is completed by the end user.
Syntax
'Declaration
 
Public Event AppointmentsDragDrop As AppointmentsDragDropHandler
public event AppointmentsDragDropHandler AppointmentsDragDrop
Event Data

The event handler receives an argument of type AppointmentsDragDropEventArgs containing data related to this event. The following AppointmentsDragDropEventArgs properties provide information specific to this event.

PropertyDescription
Appointments Returns a read-only collection of the appointments that were dragged.
ClearSelectedAppointments Returns or sets whether the SelectedAppointments collection will be cleared when the dragged appointments are dropped on a different owner than the one for which the drag operation was initiated.
CopiedAppointments A read-only collection of the appointments that were copied as a result of the user pressing the Control key during the course of the drag operation, or null if no Appointments were copied during the course of the drag operation.
HasCopies Returns a boolean indicating whether the appointments being dragged have been copied during the course of the drag operation.
InitialOwner Returns the Owner of the appointment(s) at the time the drag operation was initiated.
NewOwner Returns the new Owner of the appointment(s).
Remarks

The AppointmentsDragDrop event notifies a listener than the user has completed a drag operation involving one or more appointments, and that the drag operation was not canceled.

Example
StretchThe following code sample demonstrates how to use the AppointmentsDragDrop event to prevent the SelectedAppointments collection from being cleared after appointments are dragged:

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Stretch
StretchStretchStretchImports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics


    AddHandler Me.dayView.AppointmentsDragDrop, AddressOf OnAppointmentsDragDrop

    Private Sub OnAppointmentsDragDrop(ByVal sender As Object, ByVal e As AppointmentsDragDropEventArgs)
        '  By default, the appointment selection is cleared when ownership
        '  of the appointments changes. Setting 'ClearSelectedAppointments'
        '  to false prevents this from happening.
        e.ClearSelectedAppointments = false
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;


    this.dayView.AppointmentsDragDrop += new AppointmentsDragDropHandler(OnAppointmentsDragDrop);

    private void OnAppointmentsDragDrop(object sender, AppointmentsDragDropEventArgs e)
    {
        //  By default, the appointment selection is cleared when ownership
        //  of the appointments changes. Setting 'ClearSelectedAppointments'
        //  to false prevents this from happening.
        e.ClearSelectedAppointments = this.chkClearSelection.Checked;
    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also