.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPBaseCollection.Reload() Method

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

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll


public virtual void Reload()


An XPCollection is not loaded with data immediately after it has been created. Data is loaded on demand: 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.

If the Optimistic Locking is disabled, the Session does not refresh properties of previously loaded objects. The Session never refreshes properties of modified objects.


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.

See Also