Skip to main content

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.v24.2.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 https://supportcenter.devexpress.com/ticket/details/e81/winforms-scheduler-bind-to-multi-resource-appointments-with-xpo.