Skip to main content
A newer version of this page is available. .

SchedulerControl.DateNavigatorQueryActiveViewType Event

Enables you to specify the active view type of the Scheduler when the user selects dates in the bound DateNavigator.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll


public event DateNavigatorQueryActiveViewTypeHandler DateNavigatorQueryActiveViewType

Event Data

The DateNavigatorQueryActiveViewType event's data class is DateNavigatorQueryActiveViewTypeEventArgs. The following properties provide information specific to this event:

Property Description
NewViewType Gets or sets the type of the view to be used by the scheduler to show its data after the date range selected in the bound DateNavigator has been changed.
OldViewType Gets the type of the view used by the scheduler to show its data before the date range selected in the bound DateNavigator is changed.
SelectedDays Gets the collection of dates selected in the DateNavigator bound to scheduler.


This example uses the SchedulerControl.DateNavigatorQueryActiveViewType event of the SchedulerControl to conditionally switch the Scheduler view. When an entire week is selected in the Date Navigator, the Scheduler switches to the Week View.

using DevExpress.XtraScheduler;
using System.Windows.Forms;
        void schedulerControl1_DateNavigatorQueryActiveViewType(object sender, DateNavigatorQueryActiveViewTypeEventArgs e)
            if ((e.SelectedDays.Count == 7) && (e.SelectedDays.Start.DayOfWeek == schedulerControl1.FirstDayOfWeek))
                e.NewViewType = SchedulerViewType.Week;
See Also