ViewRecord.GetObject() Method
Returns the persistent object that the current view record corresponds to.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Returns
Type | Description |
---|---|
Object | An object which represents the persistent object that the current view record corresponds to. |
Remarks
Note that the current ViewRecord‘s ViewRecord.View must have a property declared which corresponds to the persistent class’ primary key property. Otherwise, an ArgumentException will be thrown when trying to call the GetObject method. If the persistent objects’ type is derived from the XPObject type, the primary key property is XPObject.Oid. In a case where the persistent objects’ type is derived from the XPLiteObject, XPBaseObject or XPCustomObject class, the primary key property is the property marked with the KeyAttribute.