XPMemberInfo.GetModified(Object) Method
Checks whether or not the member is modified.
Namespace: DevExpress.Xpo.Metadata
Assembly: DevExpress.Xpo.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
theObject | Object | A persistent object that will be checked. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Set the Session.TrackpropertiesModifications or XpoDefault.TrackPropertiesModifications property to true
to track changes. The GetModified
method always returns false if a Session does not track changes made to properties.
XPMemberInfo member = customer.ClassInfo.GetMember(propertyName);
string memberValue;
if(member.GetModified(customer)) {
memberValue = string.Format("{0} (old value: {1})", member.GetValue(customer), member.GetOldValue(customer));
}
else {
memberValue = (string)member.GetValue(customer);
}
For more information, refer to the %PUBLIC%\Documents\DevExpress Demos 24.2\Components\WinForms\CS\XpoTutorials\ModifiedProperties\ModifiedProperties.cs file.
See Also