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.v24.1.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.
Tip
A complete sample project is available in the DevExpress Code Examples database at https://supportcenter.devexpress.com/ticket/details/e81/winforms-scheduler-bind-to-multi-resource-appointments-with-xpo.