Recurring Events

This topic introduces the concept of the Recurring Events feature supported by the Scheduler Module, describes how to create and use Recurring Events in your schedule, and details how recurrence settings can be edited.

Non-Recurring and Recurring Events

The Scheduler module supports the following Event types:

  • Simple

    These Events occur only once in the specified time interval.

  • Recurring

    These Events occur many times in the same time interval.

The Scheduler module works with the business classes that implement the DevExpress.Persistent.Base.General.IEvent interface. To support the Recurring Events feature, these classes must implement an additional ISupportRecurrences interface. If you already have a custom class that implements the IEvent interface, you can implement the ISupportRecurrences interface yourself. Alternatively, you can use the ready-to-use DevExpress.Persistent.BaseImpl.Event class from the Business Class Library, that implements the IEvent and ISupportRecurrences interfaces. To see how this class is implemented, refer to the %PROGRAMFILES(x86)%\DevExpress 18.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl folder. If required, you can inherit from this class to extend it.

Creating a Recurring Event

To create a Recurring Event, create an Event and specify its recurrence via the Recurrence property.

In Windows Forms applications:

SchedulerEventRecurrence2

In ASP.NET Web applications:

SchedulerEventRecurrence4

Click the Recurrence editor's ellipsis button (EllipsisButton) to invoke the Recurrence dialog, and specify the required settings.

In Windows Forms applications:

SchedulerEventRecurrence

In ASP.NET Web applications:

SchedulerRecurringEventSettingsWeb

The recurrence settings specified in this dialog comprise the Recurrence Pattern.

Recurrence Pattern

A Recurring Event's recurrence settings are stored in the Recurrence Pattern. When the Scheduler module needs to visualize the Recurring Event's occurrences on a time line, it reads the recurrence settings from the Recurrence Pattern. However, a Recurring Event is not really useful in real-life applications if you cannot customize its individual occurrences. For instance, suppose you have a Recurring Event that represents a weekly meeting. You would like to specify that next week's meeting will start an hour later than usual. It is not possible to specify this via the event's Recurrence dialog. In this instance, you can edit the required occurrence on the Scheduler's time line. The Scheduler module handles such customizations automatically via a special collection associated with the event. This collection holds all the occurrences of the event that were changed or deleted. So, a Recurring Event is defined by its Recurrence Pattern and the collection of changes.

In Windows Forms applications, to edit a single occurrence of a Recurring Event, invoke the context menu and click Open. To change the settings of all the occurrences, except those that have been changed or deleted, click Edit Series:

SchedulerEditSeriesWin1

If an occurrence has been modified, you can restore its settings to the ones used in the series it belongs to. To do this, use the Restore Occurrence command.

SchedulerEditSeriesWin2

In ASP.NET applications, you have the following capabilities out-of-the-box:

SchedulerEditSeriesWeb1

  • To edit a single occurrence of a Recurring Event, invoke the context menu and click Edit.
  • To change the settings of all the occurrences, except those that have been changed or deleted, click Edit Series.
  • To open the occurrence's Detail View in a view mode, click Open. In the Detail View, click Edit, to change the settings of the current occurrence.
  • To view an occurrence as an instance of the entire series, click Open Series. In the invoked Detail View, you can modify the Resources collection of all occurrences in the series, and click Edit to changes the settings of the series.

If an occurrence has been modified, you can restore its settings to the ones used in the series it belongs to. To do this, use the Restore Occurrence Action.

SchedulerEditSeriesWeb3

Alternatively, you can use the Edit, EditSeries, OpenSeries and RestoreOccurrence Actions on the toolbar in ASP.NET Web applications:

SchedulerEditSeriesWeb2

See Also