corelibraries-devexpress-dot-xtrascheduler-dot-appointmentdrageventargs-213df715.md
Gets or sets the IDs of resources for a new appointment.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll
NuGet Package : DevExpress.Scheduler.CoreDesktop
public ResourceIdCollection NewAppointmentResourceIds { get; set; }
Public Property NewAppointmentResourceIds As ResourceIdCollection
| Type | Description |
|---|---|
| ResourceIdCollection |
A ResourceIdCollection object.
|
Use this property to specify resources to associate with the AppointmentDragEventArgs.EditedAppointment in the appointment drag event.
The following code snippet illustrates this technique. It handles the SchedulerControl.AppointmentDrag event and assigns 2nd and 5th resources to the relocated appointment :
private void schedulerControl_AppointmentDrop(object sender, AppointmentDragEventArgs e)
{
ResourceIdCollection rid=new ResourceIdCollection();
rid.AddRange(new object[] { schedulerStorage.Resources[2].Id,
schedulerStorage.Resources[5].Id });
e.NewAppointmentResourceIds=rid;
e.Handled = true;
}
Private Sub schedulerControl_AppointmentDrop(ByVal sender As Object, ByVal e As _
AppointmentDragEventArgs) _
Handles schedulerControl1.AppointmentDrop
Dim rid As ResourceIdCollection = New ResourceIdCollection()
rid.AddRange(New Object() { schedulerStorage.Resources(2).Id, _
schedulerStorage.Resources(5).Id })
e.NewAppointmentResourceIds=rid
e.Handled = True
End Sub
Note
The SchedulerStorageBase.ResourceSharing should be set to true , to allow multiple resources for an appointment.
See Also
AppointmentDragEventArgs Class