In fact, the Agenda view is a list of upcoming events grouped by the appointment's date. This list can be displayed in the GridControl component.
This example demonstrates how to implement this behavior.
Switching between the SchedulerControl's view and a GridControl instance (used as an AgendaView) is implemented by switching the visibility of the SchedulerControl and GridControl instances.
Since multi-day appointments should be displayed as several GridView rows (such appointments should be displayed in each "Day" group in accordance with the appointment's duration), we used a separate AgendaAppointment class to store the appointment's data.
To get existing appointments from the SchedulerStorage and generate a corresponding collection of AgendaAppointment instances, the SchedulerStorage.GetAppointments method is used.
By default, a month interval is used to fetch appointments for the AgendaView.
As you can see, in this example several static classes are used:
AgendaViewDataGenerator - used to generate a list of AgendaAppointment instances depending on existing appointments.
AgendaViewMenuBuilder - used to generate the GridControl's context menu with the following commands: Open appointment, Delete appointment, Go to the next interval, Go to the previous interval, Switch to other views
AgendaViewHelper - used to add the Agenda view functionality into an existing project and add a corresponding menu item into the SchedulerControl's context menu.
The GridControl is used to display the AgendaView located within the "AgendaViewControl" UserControl.
The main condition for adding the AgendaView functionality into the existing project is that the SchedulerControl (and DateNavigator if it is used in an application) are located within the LayoutControl instance.
All classes that support the AgendaView functionality are created within a separate Class Library project. To include the AgendaView functionality into the existing application, you can simply add a reference to the AgendViewComponent.dll library and write the following code line in the main form:
AgendaViewHelper.AddAgendaView(schedulerControl1, dateNavigator1, true);