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:
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.
(you will be redirected to DevExpress.com to submit your response)