[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Collapse]Scheduler
   [Expand]Getting Started
   [Collapse]Appointments
     Appointment
     Recurrence
     Labels
     Statuses
    Resources
    Reminders
    Time Regions
   [Expand]Views
   [Expand]Visual Elements
   [Expand]Styles and Templates
   [Expand]Design-Time Features
    Time Zones
   [Expand]Data Binding
    Appearance Customization
    Grouping
    Selecting
    Clipboard Operations
    Printing Templates
    Drag and Drop Customization
    Navigating
    Printing
    End-User Restrictions
   [Expand]Examples
    Migration Guidelines
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Recurrence

The DevExpress Scheduler control allows you to create recurring appointments.

Expanded How to Create Recurrences

The pattern appointment defines the schedule and time frame of a recurring series.

To create a recurring series in code, set the AppointmentItem.Type property to Pattern and use the SchedulerItemBase.RecurrenceInfo property to define the recurrence pattern. The scheduler automatically generates occurrences based on the pattern.

The RecurrenceBuilder class simplifies the task of creating recurrence patterns. The table below lists the available recurrence builders:

Recurrence Builder Example
MinutelyRecurrenceBuilder (see MinutelyRecurrenceBuilder) How to: Create Minutely Recurrence
HourlyRecurrenceBuilder (see HourlyRecurrenceBuilder) How to: Create Hourly Recurrence
DailyRecurrenceBuilder (see DailyRecurrenceBuilder) How to: Create Daily Recurrence
WeeklyRecurrenceBuilder (see WeeklyRecurrenceBuilder) How to: Create Weekly Recurrence
MonthlyRecurrenceBuilder (see MonthlyRecurrenceBuilder) How to: Create Monthly Recurrence
YearlyRecurrenceBuilder (see YearlyRecurrenceBuilder) How to: Create Yearly Recurrence

End-users can edit an appointment's recurrence pattern at runtime using the Recurrence Window.

Expanded Occurrences and Exceptions

Use the AppointmentItem.Type property to determine an appointment's type. To determine whether an appointment is recurring, use the AppointmentItem.IsRecurring property.

The Pattern appointment defines a recurring series, and Occurrence appointments are generated automatically according to the pattern. If you modify an occurrence (for example, postpone it for an hour), its type changes to ChangedOccurrence. If you delete an occurrence, it becomes a DeletedOccurrence.

Note

If you modify the pattern, the Scheduler removes all changed and deleted occurrences and repopulates the series with regular occurrences.

How to Access Occurrences and Exceptions

The Pattern, ChangedOccurrence, and DeletedOccurrence appointments are stored in the SchedulerControl.AppointmentItems collection. The Occurrence appointments are not stored in any collection to avoid a stack overflow for infinite recurring series. These appointments are automatically generated at runtime based on the pattern's SchedulerItemBase.RecurrenceInfo.

A recurring appointment's AppointmentItem.RecurrencePattern property returns the pattern.

Use the pattern's AppointmentItem.GetExceptions method to access the exceptions collection. This collection contains AppointmentType.ChangedOccurrence and AppointmentType.DeletedOccurrence appointment types. Exceptions replace regular occurrences - the Occurrence appointment with the same SchedulerItemBase.RecurrenceIndex is not generated for each appointment in the exception's collection.

Use the AppointmentItem.RestoreOccurrence method to restore the original occurrence from an exception.

Is this topic helpful?​​​​​​​