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

WeekDaysCheckEdit.WeekDays Property

Gets or sets the day of the week or a specific group of days that is selected in the WeekDaysCheckEdit control.

Namespace: DevExpress.XtraScheduler.UI

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

[DefaultValue(WeekDays.EveryDay)]
public WeekDays WeekDays { get; set; }

#Property Value

Type Default Description
WeekDays EveryDay

The WeekDays enumeration value specifying the day/days in a week.

Available values:

Name Description
Sunday

Specifies Sunday.

Monday

Specifies Monday.

Tuesday

Specifies Tuesday.

Wednesday

Specifies Wednesday.

Thursday

Specifies Thursday.

Friday

Specifies Friday.

Saturday

Specifies Saturday.

WeekendDays

Specifies Saturday and Sunday.

WorkDays

Specifies work days (Monday, Tuesday, Wednesday, Thursday and Friday).

EveryDay

Specifies every day of the week.

#Remarks

The WeekDaysCheckEdit control fires the WeekDaysChanged event in response to a change in the WeekDays property value.

#Example

This example shows how to update the days in a workweek based on days selected in the WeekDaysCheckEdit control.

using DevExpress.XtraScheduler;

private void weekDaysCheckEdit1_WeekDaysChanged(object sender, EventArgs e) {
    WeekDays weekDays = this.weekDaysCheckEdit1.WeekDays;
    WorkDaysCollection workDays = this.schedulerControl.WorkDays;
    workDays.BeginUpdate();
    workDays.Clear();
    if(!weekDays.Equals((WeekDays)0))
        workDays.Add(new WeekDaysWorkDay(weekDays));
    workDays.EndUpdate();
}
See Also