Skip to main content
.NET Framework 4.5.2+

ViewRecord.GetObject() Method

Returns the persistent object that the current view record corresponds to.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public object GetObject()

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.

See Also