.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

IObjectSpace.CustomDeleteObjects Event

Occurs to replace the default process of deleting persistent objects with a custom one.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll


event EventHandler<CustomDeleteObjectsEventArgs> CustomDeleteObjects
Event CustomDeleteObjects As EventHandler(Of CustomDeleteObjectsEventArgs)

Event Data

The CustomDeleteObjects event's data class is DevExpress.ExpressApp.CustomDeleteObjectsEventArgs.


The CustomDeleteObjects event is raised as a result of calling the IObjectSpace.Delete method. Handle this event to provide a custom process for deleting persistent objects. Use the handler's CustomDeleteObjectsEventArgs.Objects parameter to get the objects to be deleted. Set the handler's CompletedEventArgs.Handled parameter to true, to indicate that the deleting operation has already been performed.

If you implement the IObjectSpace interface in the BaseObjectSpace class' descendant, you should override the BaseObjectSpace.DeleteCore method which is called by the BaseObjectSpace.Delete method. In this instance, you won't have to raise the CustomDeleteObjects event, since it is raised by the BaseObjectSpace.Delete method. For details, refer to the IObjectSpace.Delete method description.

See Also