Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerControl.TimeRegionCustomize Event

When you disable the TimeRegion.Editable setting, users are unable to create or modify existing appointments so that they belong to this region. Handle this event and override its e.Editable parameter to remove restrictions for specific appointments and/or users.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

public event EventHandler<TimeRegionCustomizeEventArgs> TimeRegionCustomize

#Event Data

The TimeRegionCustomize event's data class is DevExpress.XtraScheduler.TimeRegionCustomizeEventArgs.

#Remarks

The code below is taken from the Scheduler Demo, where the “Lunch” time region (1p.m.~2p.m.) does not accept any appointments unless they have the “Out of Office” status.

Time Regions

scheduler.TimeRegionCustomize += (s, e) => {
    if (e.Appointment == null)
        return;
    if (e.Appointment.StatusKey.Equals(3))
        e.Editable = true;
};
See Also