.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

DeleteObjectsViewController Class

Represents a ViewController descendant that contains the Delete Action.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v21.2.dll

Declaration

public class DeleteObjectsViewController :
    ViewController

Remarks

The DeleteObjectsViewController is intended for presenting the Delete Action.

In a Windows Forms application:

DeleteAction

In an ASP.NET Web Forms application:

DeleteAction_Web

For details on the Delete Action, refer to the description of the DeleteObjectsViewController.DeleteAction property that provides access to this Action.

To customize the default behavior of the Delete Action, you can inherit from this Controller, or subscribe to its events. In addition, you can access the Action to modify its behavior.

This Controller has a descendant for ASP.NET Web Forms applications: WebDeleteObjectsViewController. Inherit from it if you need to implement a Web-specific behavior.

If you need to inherit from the DeleteObjectsViewController, the following protected virtual methods are availabe for overriding:

Method

When is it called?

Description

Delete

Invoked as a result of executing the Delete Action.

Represents the Delete Action’s SimpleAction.Execute event handler. Deletes the object(s) selected in the current View. In case of a List View, this method refreshes the collection source and editor. In case of a Detail View, the method closes it.

Raises the DeleteObjectsViewController.Deleting event.

UpdateActionState

Invoked as a result of changes made to the current View’s object(s):

Checks whether the Delete Action’s active or enabled state should be changed after the environment has been changed.

Public members are described individually in the documentation.

This Controller is activated for all Views. To ascertain whether the Controller is active, use the Controller.Active property. If you need to know the reason for its deactivation or activation at runtime, use the DiagnosticInfo Action.

Information on the DeleteObjectsViewController and its Delete Action is available in the Application Model‘s ActionDesign node. To access it, use the Model Editor.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DeleteObjectsViewController class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

See Also