How to: Bind the Scheduler with Multi-resource Appointments to XPO

To accomplish this task, do the following:

  1. Add a reference to the DevExpress.Xpo.v20.1.dll assembly.
  2. Declare the XPAppointment and XPResource classes (descending from the XPObject class).
  3. Rebuild the application, so that these objects can be used for the XPCollection.
  4. Drop two XPCollection components from the toolbox on a form and name them xpCollectionAppointments and xpCollectionResources.
  5. Set their XPCollection.ObjectClassInfo properties to the XPAppointment and XPResource objects, respectively.
  6. Specify all required mappings for appointments and resources.
  7. 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 http://www.devexpress.com/example=E81.