SchedulerStorage.FetchAppointments Event
Occurs before the SchedulerStorage starts retrieving the appointments for the specified time interval.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v24.2.dll
NuGet Package: DevExpress.Wpf.Scheduler
#Declaration
public event FetchAppointmentsEventHandler FetchAppointments
#Event Data
The FetchAppointments event's data class is FetchAppointmentsEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Force |
Gets or sets whether the appointments collection should be reloaded after handling the Scheduler |
Interval |
Gets the time interval which the event was raised for.
Inherited from Time |
#Remarks
Important
You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.
Handle the FetchAppointments event to limit the number of appointments fetched from the data source. This can be useful when working with large amounts of data, and only a small part of it needs to be loaded at one time.
The FetchAppointments event reduces the amount of data fetched from slow data sources with large data sets. Consider the interaction between the Scheduler, the Storage and the Data Source. When the Scheduler changes its displayed time interval, it requests appointments to display from the Storage. The Storage generates the FetchAppointments event and queries the Data Source for more data. This query may result in sending an excessive amount of appointment data. To prevent this, and to get only the data required for the visible time interval, you can handle the FetchAppointment event. In the event handler, you should modify the query to get only the data that required.
If the FetchAppointments event is handled, the Scheduler does not rely on its own, built-in caching strategy. The FetchAppointments event occurs in situations which do not involve any changes in displayed data, such as control resizing. To improve performance, treat these cases as your needs dictate and decide for yourself whether to query the data source for appointment data again or leave the Storage data intact.
Note
Do not clear and populate Scheduler
See the FetchAppointments Event - Handling Large Datasets document for more information.