Download Free Demos

Views

The library lets you present tasks (events) in scheduler in different views. Thus, you can choose the view that fits you needs best.

Default Views

Scheduler contains 3 tabs with the following default views:

Additional Views

You can also make use of the following additional views:

Managing Views

The added views (available on the client-side) are stored in the DHXScheduler.Views container.

Here are some useful properties and functions to operate the views:

Referring to a view

You can refer to the added views as follows:

var view = scheduler.Views[i]; // where i < scheduler.Views.Count()

Removing all views from scheduler

To remove all views from the scheduler, you need to clear the DHXScheduler.Views container like this:

scheduler.Views.Clear();

Adding a new view

To add a new view, use the code below:

scheduler.Views.Add(new AgendaView());

Setting the initial date

You can set the initial date in the following way:

scheduler.InitialDate = new DateTime(2011, 10, 7);

Setting the initially selected view

By default, the Week view is selected initially. If you want some other view to be selected initially, use the code as in:

var unit = new UnitsView("unit", "key");
scheduler.Views.Add(unit);
...
scheduler.InitialView = unit.Name;

The property is set to the value of the Name property of the view.

Custom Views

Scheduler supports creation of custom views. You can find more information in the corresponding article.

Was this article helpful?

Yes No