Skip to main content

AppointmentDataStorage.AutoReload Property

Gets or sets whether persistent object data is automatically fetched from the data source when it is modified.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

Declaration

[DefaultValue(true)]
[DXCategory("Behavior")]
public bool AutoReload { get; set; }

Property Value

Type Default Description
Boolean true

true if automatic data loading and reloading is enabled; otherwise, false.

Remarks

In bound mode, the AppointmentDataStorage object is connected to a data source via the AppointmentDataStorage.DataSource and AppointmentDataStorage.DataMember properties.

If the AutoReload property is set to true, automatic data loading and reloading is enabled:

  • when the storage object is connected to the data source, it automatically fetches records from the data source;
  • when the data source is modified, data is automatically reloaded.

Note

The AutoReload option allows the Scheduler to track changes in the object which is directly bound to the DataSource property. In the most common situation the data source is a DataTable populated by the SqlDataAdapter instance. When the table data changes, the SchedulerStorage is updated. But when records are changed directly in the SQL database, SqlDataAdapter is not aware of them and does not reload the table, so the AutoReload option is not applicable.

If the AutoReload property is set to false, the storage object doesn’t load data when it’s connected to a data source, and doesn’t reload data when the data source is modified. In this case, the SchedulerDataStorage.RefreshData method needs to be called manually to fetch data from the data source when required. For instance, this method should be called when the form is opened in order to populate the XtraScheduler control with data.

See Also