Skip to main content

Appointment Labels and Statuses

  • 3 minutes to read

This document describes the appointment marks (labels and statuses) which can be used by end-users to graphically mark the appointments in their schedule. By default, the labels and status collections contain marks which are equal to the corresponding marks in MS Outlook, and can be used to bring the Outlook style to your scheduling application. However, you can create your own custom labels and statuses and mark appointments with them. This document provides several examples.

Appointment Labels

An appointment’s identification label is one of an appointment’s basic visual characteristics (marks). It is used for at-a-glance appointment identification. The appointment’s identification label is displayed in the scheduler as a background color which is used to fill the client region of the rectangle that is occupied by the appointment.

The following picture gives an overview of what different labeling looks like.

Labels

An individual label is represented by the AppointmentLabel objects. The label’s display name and color can be accessed via its UserInterfaceObject.DisplayName and AppointmentLabel.Color properties, and all the labels are stored in the ASPxAppointmentStorage.Labels collection.

By default, the Labels collection is filled with the following labels:

LabelColors

The default values for the Labels collection items corresponds to the labels in MS Outlook 2003. However, you’re able to edit this collection and customize the existing labels, remove them and add your own custom ones. This can be done both at design time and runtime.

To mark an appointment with a specified label at runtime use the Appointment.LabelKey property:

using DevExpress.XtraScheduler;
// ...

// In this case the appointment's label will be set to Important.
Appointment.LabelKey = 1;

Tip

You can handle the ASPxScheduler.InitNewAppointment event to initialize all the newly created appointments with the specified label.

Appointment Statuses

The appointment’s availability status is one of an appointment’s basic visual characteristics (marks). It is used for at-a-glance appointment identification. The appointment’s availability status is indicated in the scheduler as a strip displayed on the left side of the appointment. The strip is colored depending upon the availability status’s type.

Status

Note

Availability statuses are only visible when the scheduler is in the Day View or Work-Week View.

An individual status is represented by the AppointmentStatus objects. The status’s display name and color can be accessed via its UserInterfaceObject.DisplayName and AppointmentStatus.Color properties, and all the statuses are stored in the ASPxAppointmentStorage.Statuses collection.

By default, the Statuses collection is filled with four statuses, presented in the picture above.

The default values for the Statuses collection items corresponds to the availability statuses in MS Outlook 2003. However, you’re able to edit this collection and customize the existing statuses, remove them or add your own custom ones. This can be done both at design time and runtime.

To mark an appointment with the specified availability status at runtime, use the Appointment.StatusKey property.

Tip

You can handle the ASPxScheduler.InitNewAppointment event to initialize all the newly created appointments with the specified availability status.

Online Example

How to: Add Custom Labels and Statuses