Skip to main content
.NET Framework 4.5.2+

IObjectSpace.SetModified(Object, IMemberInfo) Method

Sets the state of the specified object to be Modified and adds the passed object to the track list to be committed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v22.2.dll

NuGet Package: DevExpress.ExpressApp


void SetModified(
    object obj,
    IMemberInfo memberInfo


Name Type Description
obj Object

A persistent object whose state is the subject to be Modified.

memberInfo IMemberInfo

An IMemberInfo object providing metadata on the property whose value has been changed.


For object changes that cannot be tracked via notification mechanisms exposed by the data layer, use the SetModified method. This method adds the object passed as the obj parameter to the list of objects to be committed

If you implement the IObjectSpace interface in the BaseObjectSpace class’ descendant, you don’t have to override the SetModified method. This method is implemented in the BaseObjectSpace class. The BaseObjectSpace.SetModified method invokes a protected virtual BaseObjectSpace.SetModified(Object obj, ObjectChangedEventArgs args) method. So, you should override the virtualCreateObjectCore method. Use the memberInfo parameter to specify the property that has been changed.

Note that you can raise the IObjectSpace.ObjectChanged event in your BaseOBjectSpace.SetModified method override. This event is handled internally, so that both a Detail View’s Property Editor and a List View’s List Editor will be refreshed if their object has changed.

The objects that are currently in the Modified state are available via the IObjectSpace.ModifiedObjects property.

See Also