How to: Bind the Scheduler with Multi-resource Appointments to XPO
To accomplish this task, do the following:
- Add a reference to the DevExpress.Xpo.v22.2.dll assembly.
- Declare the XPAppointment and XPResource classes (descending from the XPObject class).
- Rebuild the application, so that these objects can be used for the XPCollection.
- Drop two XPCollection components from the toolbox on a form and name them xpCollectionAppointments and xpCollectionResources.
- Set their XPCollection.ObjectClassInfo properties to the XPAppointment and XPResource objects, respectively.
- Specify all required mappings for appointments and resources.
- Handle the SchedulerStorageBase.AppointmentsChanged and SchedulerStorageBase.AppointmentsInserted events. The event handler calls the XPBaseObject.Save method.
A complete sample project is available in the DevExpress Code Examples database at https://supportcenter.devexpress.com/ticket/details/e81/how-to-bind-the-xtrascheduler-with-multi-resource-appointments-to-xpo.