- 4 minutes to read
An appointment represents a scheduled time interval, and an end-user's plans for this time interval. A plan could contain the appointment's subject, location, different marks (status and labels), comments and any other custom properties.
A single appointment is an object that exposes the Appointment interface. The appointment's appearance depends upon the active view (ASPxScheduler.ActiveView) which is used to show the Scheduler's data. For instance, for the Day View a common appointment usually looks as shown in the image below.
All of a scheduler's appointments are stored in the BootstrapAppointmentStorage (which is a part of the Scheduler Storage and is accessed via its BootstrapSchedulerStorage.Appointments property). The collection of all the appointments is accessed via the AppointmentStorageBase.Items property.
Labels and Statuses
An appointment's identification label and availability status are an appointment's basic visual characteristics. They are used for at-a-glance appointment identification.
An identification label is displayed in as a background color which is used to fill the client region of the rectangle that is occupied by the appointment.
An individual label is represented by the BootstrapAppointmentLabel objects. The label's display name and color can be accessed using its BootstrapAppointmentLabel.Text and AppointmentLabel.Color properties, and all the labels are stored in the BootstrapAppointmentStorage.Labels collection.
The availability status is indicated by a strip displayed on the left side of the appointment. The strip is colored depending upon the availability status's type.
An individual status is represented by the BootstrapAppointmentStatus objects. The status's display name and color can be accessed via its BootstrapAppointmentStatus.Text and AppointmentStatus.Color properties, and all the statuses are stored in the BootstrapAppointmentStorage.Statuses collection.
The default appearance of statuses and labels can be changed using the BootstrapSchedulerOptionsAppearance.DefaultAppointmentColorsMode property. This property allows the following values:
- Bootstrap - Contextual colors provided by Bootstrap are used. This value is used by default.
- Internal - Colors provided by DevExpress are used.
A recurring appointment is an appointment configured to occur on multiple dates in the same time interval. Whether an appointment is recurring is specified by the Appointment.IsRecurring property.
Recurring appointments can be of different types. Note that the type of any particular appointment is accessed via its Appointment.Type property. The following image demonstrates the possible types of recurring appointments.
A recurring appointment can either be a base (a Pattern), or an occurrence. Occurring appointments can either be a simple Occurrence, or an exception (a ChangedOccurrence or a DeletedOccurrence).
An appointment can have one or more reminders. They are responsible for sending alerts at specified time periods before an appointment's start time. An appointment displays the image if it has a reminder. The Bootstrap Scheduler Suite provides an abstract ReminderBase class, which implements the basic reminder functionality and two derived classes - Reminder for AppointmentType.Normal type appointments and RecurringReminder for recurring appointments.
Storing and Retrieving Appointments
The data source storing appointments can be specified using the ASPxSchedulerDataWebControlBase.AppointmentDataSourceID property. Specify the following data field mapping properties (available through ASPxAppointmentStorage.Mappings) to enable the Scheduler control to save and retrieve appointment data to/from the data source.
- ASPxAppointmentMappingInfo.AppointmentId - Specifies the data field storing appointments’ unique identifiers.
- ASPxAppointmentMappingInfo.Start - Specifies the data field storing appointments’ start dates and times.
- ASPxAppointmentMappingInfo.End - Specifies the data field storing appointments’ end dates and times.
- ASPxAppointmentMappingInfo.Description - Specifies the data field storing appointments’ descriptions.
- ASPxAppointmentMappingInfo.Location - Specifies the data field storing locations where appointments are scheduled.
Specify the following data field mapping properties to allow the Scheduler control to save and retrieve labels’ and statuses’ information to/from the data source.
- ASPxAppointmentMappingInfo.Label - Specifies the data field storing appointments’ statuses.
- ASPxAppointmentMappingInfo.Status - Specifies the data field storing appointments’ labels.
Specify the following data field mapping properties to allow the Scheduler control to save and retrieve appointment recurrence information to/from the data source.
- ASPxAppointmentMappingInfo.Type – Specifies the data field storing appointments’ types (normal or recurring).
- ASPxAppointmentMappingInfo.RecurrenceInfo - Specifies the data field storing appointments’ recurrence rules.
To learn more, see the Data Binding demo online.