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 Class

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

Namespace: DevExpress.XtraScheduler.UI

Assembly: DevExpress.XtraScheduler.v24.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