Skip to main content
A newer version of this page is available. .

DxSchedulerAppointmentItem Class

The scheduled event displayed in the Scheduler’s view.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

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 a 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 edit form appears.

    Compact Edit Form

  3. Fill in the fields and click Save or click the Expand Arrows button Scheduler - The Expand Arrows icon to show the pop-up (detailed) form:

    Pop-up Edit Form

  4. Fill in the fields and click Save.

You can prevent users from creating new appointments. To do this, set the AllowCreateAppointment property to false.

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:

    Scheduler - An appointment tooltip

  2. Click the Edit button Scheduler - The Edit icon to invoke the compact edit form.

    Scheduler - An Appointment edit form

  3. Edit the fields and click Save.

    You can also use the pop-up (detailed) form to edit the appointment fields. To show the form, click the Expand Arrows button Scheduler - The Expand Arrows icon.

You can prevent users from editing appointments. To do this, set the AllowEditAppointment property to false.

Delete Appointment

  1. Click an appointment to show its tooltip.

    Scheduler - An appointment tooltip

  2. Click the Delete button Scheduler - The Delete icon.

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.

You can prevent users from deleting appointments. To do this, set the AllowDeleteAppointment property to false.

Appointment Types

One-Time Appointment

A one-time appointment has its start and end, and does not belong to any recurring series. The DxSchedulerAppointmentItem.Type is OneTime.

Scheduler - Normal appointment

A source object for the one-time appointment has the following properties:

@code { 
  Appointment apt = new Appointment {
    AppointmentId = 1,
    Caption = "Website Redesign 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 one-time appointment that occupies the entire day or multiple days. Its Type is OneTime and the AllDay property is true.

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

Scheduler - All-Day appointment

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

Scheduler - All-Day appointment form

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 one-time appointment to an all-day appointment. To do this, set 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.

Scheduler - A recurring appointment

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 one-time or all-day appointment:

Scheduler - The Repeat section

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 recurrence pattern and recurrence rule. Click Save to save changes 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 Scheduler - The Restore icon.

Inheritance

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