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

How to: Set Custom Working Days

The following example demonstrates how to set week work days to Monday, Tuesday and Wednesday. All the other week days will not be regarded as working days and therefore will not be displayed within the WorkDays View.

The BeginUpdate and EndUpdate method pair is mandatory when adding or removing items of the SchedulerControl.WorkDays collection. This technique ensures that the SchedulerControl displays specified workdays and prevents excessive change notifications from being sent. The SchedulerControl will not receive any change notifications until the EndUpdate method is invoked, and then only a single change notification will be sent.

schedulerControl1.WorkDays.BeginUpdate();
schedulerControl1.WorkDays.Clear();         
schedulerControl1.WorkDays.Add(WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday);
schedulerControl1.WorkDays.EndUpdate();