Skip to main content
A newer version of this page is available. .

IObjectSpace.SetModified(Object) 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.v18.2.dll

Declaration

void SetModified(
    object obj
)

Parameters

Name Type Description
obj Object

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

Remarks

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.

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 in case their object has changed.

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

See Also