Skip to main content

SchedulerStorageBase.RefreshData() Method

Updates XtraScheduler to reflect any changes made in the data sources which store the appointments and appointment resources.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.Core.Desktop.dll

Declaration

public virtual void RefreshData()

Remarks

Appointments and appointment resources for the XtraScheduler control can be stored in external data sources. To connect the XtraScheduler control to these data sources, use the DataSource and DataMember properties of the Appointments and Resources objects.

By default, data from the data sources is automatically reloaded after each change is made to the data sources (for instance, when records are added, deleted or modified). Automatic data reloading can be disabled via the PersistentObjectStorage<T>.AutoReload properties of the AppointmentStorageBase and ResourceStorageBase objects. If this property is set to false, the XtraScheduler control ignores any change notifications sent by the data source, and doesn’t automatically reload data. You need to manually call the RefreshData method to reload the data in the data source for the changes to appear in the XtraScheduler control.

Note

If you reference appointments, appointment dependencies and/or resources in code, remember that these objects are disposed and re-created when you call the RefreshData method.

Note for VB.NET users: an appointment, newly created via the SchedulerStorageBase.CreateAppointment method has its PersistentObject.CustomFields values set to Nothing. However after calling the RefreshData method, which loads data from the data source, the appointment custom field values are set to the values of the mapped data fields. If the data field does not contain any value, then the corresponding custom field value becomes DBNull instead of Nothing.

Important

We always recommend testing the ISchedulerStateService.IsDataRefreshAllowed property before manually executing the SchedulerStorageBase.RefreshData or SchedulerControl.RefreshData methods.

Implements

See Also