DxSchedulerAppointmentItem Class

The scheduled event displayed in the Scheduler's view.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public class DxSchedulerAppointmentItem :
    DxSchedulerSourceObjectContainer

Remarks

Appointments are stored in the DxSchedulerDataStorage object. They are automatically created from source objects retrieved from the AppointmentsSource collection. When an end-user modifies an appointment, the related source object is updated automatically. When users add or delete appointments, the storage's appointment collection changes and the collection of source objects reflects the changes.

Create Appointment

  1. Click an empty cell in the view and drag the mouse pointer across other cells to extend the selection.

  2. Release the button. The compact Appointment form appears.

    appointment-form-create-compact

  3. Fill in the fields and click Save or click the Expand Arrows button to show the full Appointment form:

    appointment-form-create-full

  4. Fill in the fields and click Save.

Edit Appointment

Users can change an appointment as follows:

  • Reschedule: drag and drop an appointment to another cell.
  • Extend or shorten: drag the top or bottom appointment's border.
  • Change the appointment details.

To change the appointment details, do the following:

  1. Click an appointment to show its tooltip:

  2. Click the Edit button to invoke the Appointment form.

  3. Edit the fields and click Save.

Delete Appointment

  1. Click an appointment to show its tooltip.

  2. Click the Delete button .

Tip

If an appointment is a regular occurrence in a recurring series, a confirmation dialog appears as described in the Delete Recurring Appointment or Series section.

Appointment Types

Normal Appointment

A normal appointment has its start and end, and does not belong to any recurring series. The DxSchedulerAppointmentItem.Type is Normal.

A source object for the normal appointment has the following properties:

@code { 
  Appointment apt = new Appointment
    {
      AppointmentId = 1,
      Caption = "Website Re-Design Plan",
      StartDate = DateTime.Today.Date + (new TimeSpan(1, 9, 30, 0)),
      EndDate = DateTime.Today.Date + (new TimeSpan(1, 11, 30, 0))
    };
}

All-Day Appointment

An all-day appointment is a normal appointment that occupies the entire day or several days. Its Type is Normal and the AllDay property is true.

All-day appointments are displayed in the all-day panel at the top of the view:

A user can turn on the All Day switch in the Appointment form to convert a normal appointment to an all-day appointment.

An all-day appointment's source object has the following properties:

@code { 
  Appointment apt = new Appointment
  {
    AppointmentId = 2,
    Caption = "Book Flights to San Fran for Sales Trip",
    StartDate = date + (new TimeSpan(1, 12, 0, 0)),
    EndDate = date + (new TimeSpan(1, 13, 0, 0)),
    AllDay = true
  };
}

You can convert a normal appointment to an all-day appointment merely by setting the the AllDay property to true. The Start and End property values still remain but they are ignored. Only the Start property is used to determine the day the all-day appointment occupies.

Recurring Appointments

A recurring appointment is an appointment that repeats on a schedule. A recurring appointment in a scheduler view is indicated with a recurrence icon recurrence-icon.

A recurring series consists of appointments that have the same recurrence pattern.

A recurrence pattern's source object has the following properties:

@code { 
  RecurringAppointment apt = new RecurringAppointment 
  {
    AppointmentId = 4,
    AppointmentType = 1,
    Caption = "Daily Meeting",
    StartDate = date + (new TimeSpan(1, 9, 0, 0)),
    EndDate = date + (new TimeSpan(1, 9, 15, 0)),
    Recurrence = string.Format("<RecurrenceInfo Start=\"{0}\" End=\"{1\"
     WeekDays=\"62\" Id=\"6de79b21-6b16-4dea-9736-c500058ec858\"
     OccurrenceCount=\"25\" Range=\"1\" />",
     date + (new TimeSpan(1, 9, 0, 0)), date + (new TimeSpan(1, 9, 15, 0)))
  };
}

A recurrence rule specifies a recurring series's schedule. The RecurrenceInfo property contains the rule and the RecurrenceInfoId property contains the rule ID. The pattern is created from appointment item data retrieved from the scheduler storage. Other appointments in a series are created from the pattern and their Start and End values are calculated based on a recurrence rule.

When you delete or change a recurring appointment, an exception appointment is created (the Type is set to DeletedOccurrence or ChangedOccurrence ). The exception contains the identifier of its recurrence info and recurrence index that prevents the scheduler from creating a recurring appointment in place of an exception.

Create Recurring Series

Select a value other than Never in the Appointment form's Repeat section to create a recurring appointment series from a normal or all-day appointment:

The Recurrence Rule form appears. For each rule type it has a different layout, as illustrated in the image gallery below:

Fill in the fields to specify the recurrence rule and click Save to assign it to the RecurrenceInfo property.

Edit Recurring Series

To edit a recurring appointment, click it to show its tooltip and click the Edit button. The following dialog appears:

appointment-recurring-edit-confirmation-dialog

  • Click Edit series to invoke the Appointment form that allows you to modify the recurence pattern and recurrence rule. Click Save to save change to the pattern.
  • Click Edit appointment to invoke the Appointment form without the Repeat section. It prevents you from changing the recurrence rule. Click Save to create a new appointment that is the recurrence exception.

Delete Recurring Appointment or Series

Click the recurring appointment to show the appointment tooltip and click the Delete button. The following dialog appears:

appointment-recurring-delete-confirmation-dialog

  • Click Delete series to delete the recurrence pattern and all appointments that belong to a series, including exceptions.
  • Click Delete appointment to remove the regular appointment occurrence and create a new hidden appointment that is the recurrence exception and has the DeletedOccurrence type.

Restore Occurrence

You can convert the recurrence exception back to the regular occurrence. For this, click the appointment that is the recurrence exception to show the appointment tooltip and click the Restore Occurrence button .

Inheritance

Object
DevExpress.Blazor.Scheduler.Internal.NotifyPropertyChangedBase
DxSchedulerSourceObjectContainer
DxSchedulerAppointmentItem
See Also