Skip to main content
.NET Framework 4.6.2+

Scheduler Module Overview

  • 6 minutes to read

The Scheduler module allows you to use event/appointment management UI in a List View. You can switch between different calendar views - from a single day to multiple weeks, display side-by-side calendars, enable synchronized date navigator control, and use many other capabilities available in DevExpress Scheduler controls for WinForms, ASP.NET and Blazor.

Scheduler Module Components

Modules

Platform Module
Platform-agnostic DevExpress.ExpressApp.Scheduler
ASP.NET Core Blazor DevExpress.ExpressApp.Scheduler.Blazor.SchedulerBlazorModule
Windows Forms SchedulerWindowsFormsModule
ASP.NET Web Forms SchedulerAspNetModule

Integrated DevExpress Controls

Platform Editor Control Demo / Overview
ASP.NET Core Blazor DevExpress.ExpressApp.Scheduler.Blazor.Editors.SchedulerListEditor Blazor.DxScheduler DxScheduler Demo
Windows Forms Win.SchedulerListEditor XtraScheduler.SchedulerControl Scheduler Overview
ASP.NET Web Forms Web.ASPxSchedulerListEditor ASPxScheduler.ASPxScheduler ASPxScheduler Demo

Tip

You can change the Scheduler List Editor type to a regular List Editor. For more information, refer to the following topic: How to: Display Appointments in a Data Table (Grid List Editor).

Scheduler Data Types

Events

A Scheduler List Editor can visualize a list of DevExpress.Persistent.Base.General.IEvent objects. XAF declares this interface in its Business Class Library. Note that the Scheduler module implements special Property Editors for IEvent properties.

You can implement event/appointment objects from scratch or use pre-defined DevExpress.Persistent.BaseImpl.EF.Event (Entity Framework Core) or DevExpress.Persistent.BaseImpl.Event (XPO) classes from the Business Class Library. Inherit from these classes to add specific members to your objects.

To see how these classes are implemented, refer to the following resources:

  • %PROGRAMFILES%\DevExpress 24.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl.EFCore
  • %PROGRAMFILES%\DevExpress 24.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl.Xpo

For more information on how to implement a custom event class, refer to the following example: XAF - Create Custom Event and Resource Classes for XAF Scheduler.

Note

If you use a custom IEvent implementations, set the List View’s AllowEdit property to True to allow event/appointment drag and drop.

To use the Event class as is, add it to the application module. In .NET Framework applications, use the Module Designer and rebuild the solution. To learn how to add the Event class to a .NET application, see the following topic: How to: Add the Scheduler Module (.NET).

Relationship Between Events and Appointments

Appointments are abstractions of the underlying Business Object Event class instances (DevExpress.Persistent.BaseImpl.EF.Event and DevExpress.Persistent.BaseImpl.Event) that are actually stored in the database.

The Scheduler module uses the following appointment classes:

  • DevExpress.Blazor.DxSchedulerAppointmentItem (ASP.NET Core Blazor)
  • DevExpress.XtraScheduler.Appointment (Windows Forms)

XAF maps appointments to events. If you use standard Event classes or implement the IEvent interface in your custom class, you do not have to change the mapping configuration. You can still use the AppointmentsMappings property to re-map the appointments to other properties, if needed:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Scheduler.Blazor.Editors;

namespace YourApplicationName.Module.Controllers {
    public class SchedulerController : ObjectViewController<ListView, CustomEvent> {
        protected override void OnViewControlsCreated() {
            base.OnViewControlsCreated();
            ((SchedulerListEditor)View.Editor).AppointmentsMappings.Start = "CustomStart";
        }
    }
}

Generally, you would not need to customize appointment classes. In some cases, you may need to obtain an appointment class (for example, in a Scheduler event handler). To access the underlying Event class, use the SourceObjectHelper property of the SchedulerListEditorBase class:

using DevExpress.Blazor;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Scheduler.Blazor.Editors;
using DevExpress.Persistent.BaseImpl;
using Microsoft.AspNetCore.Components;

namespace YourApplicationName.Module.Controllers {
    public class SchedulerController : ObjectViewController<ListView, Event> {
        protected override void OnViewControlsCreated() {
            base.OnViewControlsCreated();
            var schedulerListEditor = (SchedulerListEditor)View.Editor;
            schedulerListEditor.SchedulerModel.AppointmentUpdated = 
            EventCallback.Factory.Create<DxSchedulerAppointmentItem>(this, appointment => {
                    var sourceEvent = schedulerListEditor.SourceObjectHelper.GetSourceObject(appointment);
                    SendEmail($"Event {sourceEvent.Subject} is updated.");
            });
        }
    }
} 

Properties and Corresponding Property Editors

The IEvent interface has the following properties: Subject, Description, StartOn, EndOn, AllDay, Location, Label, Status, Type (set by the Scheduler Control), and ResourceId (see Resources in a Schedule). The Label and Status properties define event colors in the Scheduler List Editor. The following property editors allow users to set these colors in a Detail View:

ASP.NET Core Blazor

SchedulerLabelPropertyEditor

SchedulerStatusPropertyEditor

Windows Forms

SchedulerLabelPropertyEditor

SchedulerStatusPropertyEditor

ASP.NET Web Forms

ASPxSchedulerLabelPropertyEditor

ASPxSchedulerStatusPropertyEditor

They display the IEvent.Label and IEvent.Status properties in a Detail View, respectively. A value that you select for these properties is bound to a specific color. This color represents the property value in the Event List View. For more information about the corresponding property types, refer to the following topic Miscellaneous Property Types.

For information on how to customize these properties, refer to the following topic: How to: Customize Status and Label Properties.

ASP.NET Core Blazor

Scheduler Module Detail View ASP.NET Core Blazor, DevExpress

Scheduler Module List View ASP.NET Core Blazor, DevExpress

Windows Forms

Scheduler Module Detail View Windows Forms, DevExpress

Scheduler Module List View Windows Forms, DevExpress

ASP.NET Web Forms

Scheduler Module Detail View ASP.NET Web Forms, DevExpress

Scheduler Module List View ASP.NET Web Forms, DevExpress

Switch between Calendar Types (Day, Week, Month, and others)

The Event List View has several view types (the Day View is displayed in the image above). An Event object’s properties are displayed in different ways in each view. To set the required view, use the SchedulerViewType property of the Application Model’s Views | <ListView> node.

In ASP.NET Web Forms applications, use the Views | <ListView> node’s IModelListViewSchedulerWeb.ScrollAreaHeight property to set the required height of the scroll container that encloses the scheduler.

In ASP.NET Web Forms applications, you can set the required count of calendars displayed by the integrated Date Navigator. To do this, use the DateNavigatorRowCount property of the Application Model’s Views | <ListView> node.

Resources (Side-by-Side Calendar Display)

You can link events to resources. For instance, in a car rental application, an event is a time interval when a car is booked, and the car is a resource. You can schedule the time when a particular resource (car) is busy. Scheduler controls can display calendars for multiple resources side-by-side. For more information about resources, refer to the following topic: Resources in a Schedule.

Cross-Platform Compatibility

To make your custom Event classes compatible with the Scheduler module in ASP.NET Core Blazor applications, add the RecurrenceInfoXmlBlazor property. You can see the implementation in the Event.cs file at the following location:

  • Entity Framework Core: %PROGRAMFILES%\DevExpress 24.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl.EFCore
  • XPO: %PROGRAMFILES%\DevExpress 24.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl.Xpo

In the file, look for the #region Blazor compatibility tag.

Add the Scheduler Module to Your Application

Solution Wizard

You can add the Scheduler module to your application when you use the Solution Wizard to create a new XAF solution. Select the module in the Choose Extra Modules step.

.NET

For step-by-step instructions of how to add the Scheduler module to your application, refer to the following topic: How to: Add the Scheduler Module (.NET).

.NET Framework

Windows Forms

To add the Scheduler module to your Windows Forms module, invoke the Module Designer and drag the SchedulerWindowsFormsModule item from the Toolbox to the RequiredModules panel.

Alternatively, you can add this module to the Windows Forms application project. To do this, invoke the Application Designer and drag the SchedulerWindowsFormsModule from the Toolbox to the Modules panel.

Do not forget to rebuild your solution after making changes in a Designer.

ASP.NET Web Forms

To add this module to the ASP.NET Web Forms application project, invoke the Application Designer and drag SchedulerAspNetModule item from the Toolbox to the Modules panel.

Alternatively, you can add this module to your ASP.NET Web Forms module. To do this, invoke the Module Designer and drag the SchedulerAspNetModule item from the Toolbox to the RequiredModules panel.

Do not forget to rebuild your solution after making changes in a Designer.

See Also