Skip to main content

WeekDaysCheckEdit Class

The control that allows users to select days of the week by checking the corresponding boxes.

Namespace: DevExpress.XtraScheduler.UI

Assembly: DevExpress.XtraScheduler.v23.2.dll

NuGet Package: DevExpress.Win.Scheduler

Declaration

[ComVisible(false)]
public class WeekDaysCheckEdit :
    XtraUserControl,
    ISupportInitialize,
    IBatchUpdateable,
    IBatchUpdateHandler,
    IXtraResizableControl

Remarks

Use the WeekDaysCheckEdit.FirstDayOfWeek property to specify the control’s initial settings.

WeekDaysCheckEdit

When the user makes changes, the control fires the WeekDaysCheckEdit.WeekDaysChanged event. Use the WeekDaysCheckEdit.WeekDays property to obtain the combination of checked weekdays.

Enable the WeekDaysCheckEdit.UseAbbreviatedDayNames option to shorten names of the weekdays.

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