Skip to main content
A newer version of this page is available.
All docs
V19.1

ASPxSchedulerStorage.FetchAppointments Event

Occurs before the ASPxSchedulerStorage starts retrieving the appointments for the specified time interval.

Namespace: DevExpress.Web.ASPxScheduler

Assembly: DevExpress.Web.ASPxScheduler.v19.1.dll

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
ForceReloadAppointments Gets or sets whether the appointments collection should be reloaded after handling the SchedulerStorageBase.FetchAppointments event.
Interval Gets the time interval which the event was raised for. Inherited from TimeIntervalEventArgs.

Remarks

Handle the FetchAppointments event to limit the number of appointments fetched from the data source. This can be useful when working with a large amount 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 the Storage for appointments to display. 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 data that is 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 required data.

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 appointment data should be queried again or remain intact.

Note

Do not clear and populate ASPxSchedulerStorage.Appointments collection items within the FetchAppointments event handler, because this event was specially created to minimize the loading time in databound mode, by loading only visible appointments. It occurs before the SchedulerStorage starts to retrieve the appointments for the specified time interval, and allows you to modify the data source using the e.Interval property value as a query parameter. If appointments are generated within the FetchAppointments event handler, you may fail to retrieve custom fields when appointments are being displayed, because appointment data is disposed of. That is, it’s not suitable for unbound mode.

Implements

See Also