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

XPBaseCollection.TopReturnedObjects Property

Gets or sets the maximum number of objects retrieved by the collection from a data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v20.2.dll


public int TopReturnedObjects { get; set; }
Public Property TopReturnedObjects As Integer

Property Value

Type Description

An integer that specifies the maximum number of objects that will be retrieved by the collection from a data store. 0 indicates that all objects which match the criteria will be retrieved.


If this property's value is greater than 0, then the collection retrieves only the first TopReturnedObjects objects which match the collection's XPBaseCollection.Criteria.


Use the TopReturnedObjects property to adjust an XPCollection's object retrieval options before it's loaded. Once a collection is loaded, changing this property has no effect. To make the changes take effect, you need to manually reload the collection. When an XPCollection is created using a constructor with the criteriaEvaluationBehavior parameter, it is loaded immediately. So, changing the TopReturnedObjects property will also have no effect.

See Also