Example E27
Visible to All Users

WinForms Scheduler - Customize the work week and display country-specific holidays

This example demonstrates how to add country-specific holidays (Kuwait), customize the work week (from Sunday to Thursday), and change appearance settings of cells within the Date Navigator.

Use the SchedulerControl.WorkDays property to add weekdays and holidays:

C#
private void Form1_Load(object sender, EventArgs e) { schedulerControl1.BeginUpdate(); schedulerControl1.OptionsView.FirstDayOfWeek = FirstDayOfWeek.Sunday; schedulerControl1.WorkDays.Clear(); schedulerControl1.WorkDays.Add(WeekDays.Sunday | WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday | WeekDays.Thursday); GenerateHolidaysFor2015(); schedulerControl1.EndUpdate(); }

Use the DateNavigator.CellStyleProvider property to specify a custom cell style provider (v15.2+) to customize appearance settings of Date Navigator cells. The CustomCellStyleProvider class implements ICalendarCellStyleProvider. The UpdateAppearance method changes the background and foreground color of date cells and displays an icon.

Note

You can also use Formatting Services. Scheduler Services allow you to quickly implement common tasks (navigation, selection, formatting of certain captions, keyboard and mouse event handling).

Read the following help topic for additional information: Scheduler Services.

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.