Scheduler Cell Containers
The cell containers in RadScheduler are the elements which contain cells and appointments. The cells and the appointments are dynamic elements which get recycled and updated under various conditions. The cell containers are responsible for handling this. All cell containers inherit from the abstract SchedulerCellContainer class. Elements that implement this type are: DayViewAllDayHeader, DayViewAppointmentsTable, DayViewHeader, MonthViewAreaElement, MonthViewHeader, MonthViewVerticalHeader, TimelineAppointmentsPresenter, TimelineHeader.
Initializing The Elements
The InitializeCells and InitializeAppointments methods are used to refresh the cell elements and appointment elements respectively. Both methods first remove the existing elements and add them to a cache so they can be reused later. After that new elements are either created or pulled out from the cache. The methods are called when the containers are being constructed and when a change that requires a refresh of the elements occurs (e.g. if you change the DayCount in day view). The AppointmentsRefreshing and CellsRefreshing events are fired by these methods before the refresh is performed. These event allow you to cancel the refresh. The AppointmentRefreshed and CellsRefreshed events are fired after the refresh is performed and allow you to do some custom operations over the newly created elements.
Initialize Elements
Handle Events
Updating The Elements
The UpdateCells and UpdateAppointments are called to synchronize the existing elements with the information from the active view (e.g. when the start date of the view changes, the cells’ dates are synchronized). Unlike the Initialize methods, these methods leave the elements as they are and just update their properties. The Initialize methods call these methods when the new elements are created to update their properties. These methods cause the CellFormatting and AppointmentFormatting events respectively.
Update Elements
Getting The Existing Elements
You can access the cell element and the appointment elements from a SchedulerCellContainer by using the CellElements and the AppointmentElements collections.
Access Elements
Accessing The Containers From The ViewElement
The SchedulerViewElement base type provides means for accessing the containers in the current view. Using the GetCellContainers method you can get all the containers in a list and perform for example an update operation over all of them:
Update Elements In The Container
For your convenience, there are the InitializeCells, UpdateCells, InitializeAppointmentElements, UpdateAppointmentElements methods of the view element which you can use to perform the same operation over all of the child SchedulerCellContainers:
Update Elements From The View Element
Additionally, there are the GetCellEments and the GetAppointmentElements methods which return a list of all cell or appointment elements from all containers in the view.