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

How to: Programmatically Change the Active View

This example demonstrates how to programmatically change the Scheduler’s view. To do this you should change the value of the SchedulerControl.ActiveViewType property. For instance, changing this property’s value to SchedulerViewType.Week will force the scheduler to use its SchedulerControl.WeekView options.

using DevExpress.XtraScheduler;
// ...

// Switch the Scheduler to the Day View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Day;

// Switch the Scheduler to the Work Week View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.WorkWeek;

// Switch the Scheduler to the Week View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Week;

// Switch the Scheduler to the Month View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Month;