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.v19.2.dll
Declaration
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.
scheduler.TimeRegionCustomize += (s, e) => {
if (e.Appointment == null)
return;
if (e.Appointment.StatusKey.Equals(3))
e.Editable = true;
};
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TimeRegionCustomize event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.