Version

ClearSelectedAppointments Property

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.
Syntax
'Declaration
 
Public Property ClearSelectedAppointments As Boolean
public bool ClearSelectedAppointments {get; set;}
Remarks

To support legacy behavior, the SelectedAppointments collection is cleared when the active owner changes; set the ClearSelectedAppointments property to false to prevent this.

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