XPCollection.Lookup(Object) Method
Retrieves an object from the collection by object ID.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Parameters
Name | Type | Description |
---|---|---|
key | Object | ID of an object to retrieve from the collection. |
Returns
Type | Description |
---|---|
Object | An object found or null reference (Nothing in VisualBasic) if an object does not exist in the collection. |
Remarks
If the XPBaseCollection.LoadingEnabled property is set to true (default value) the collection will be automatically populated with data (if it’s still not populated) when its contents are accessed for the first time.
Note
The Lookup and Session.GetObjectByKey methods do not find objects until they are saved to a data store.