Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

XPBaseCollection.Reload() Method

Clears the collection and marks it to be reloaded with data from the data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public virtual void Reload()

Remarks

An XPCollection is not loaded with data immediately after it has been created. Data is loaded on-demand, i.e. when the collection’s contents is accessed. The Reload method clears the collection, but doesn’t force it to reload immediately. The collection will be populated with data only when its contents are accessed.

The Reload method does not reload objects that are already loaded from a database (even if they are modified), unless they are modified by another application.

Note

When an XPCollection is created using a constructor with the criteriaEvaluationBehavior parameter, it is loaded immediately and its XPBaseCollection.LoadingEnabled property is automatically set to false. After that, the collection cannot be reloaded using the Reload method, since object loading is disabled. Calling this method only clears the collection.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Reload() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also