Skip to main content
All docs
V26.1
  • 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.v26.1.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