LinkUnlinkController Class

Represents a ViewController descendant, that contains the Link and Unlink Actions.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v18.1.dll

Syntax

public class LinkUnlinkController :
    ViewController,
    ISupportUpdate,
    IModelExtender

The LinkUnlinkController is intended for presenting the Link and Unlink Actions.

In a Windows Forms application:

LinkUnlinkController_Actions_Win

In an ASP.NET application:

LinkUnlinkController_Actions_Web

For details on the Link and Unlink Actions, refer to the description of the LinkUnlinkController.LinkAction and LinkUnlinkController.UnlinkAction properties that provide access to these Actions.

To customize the default behavior of the Link and Unlink Actions, you can inherit from this Controller, or subscribe to its events. In addition, you can access the Actions to modify their behavior.

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

Method When is it called? Description
CreateLinkView Invoked as a result of executing the Link Action. Represents the Link Action's PopupWindowShowAction.CustomizePopupWindowParams event handler. Creates a List View for the Link Action's pop-up Window. This List View corresponds to the Views
CustomizeLinkTemplate Invoked as a result of executing the Link Action. Represents the Link Action's PopupWindowShowAction.CustomizeTemplate event handler. Adds the Search functionality according to the IModelCommonMemberViewItem.LookupEditorMode property of the current List Property Editor's Views | <DetailView> | Items | <PropertyEditor> node.
Link Invoked as a result of executing the Link Action. Represents the Link Action's PopupWindowShowAction.Execute event handler. Adds the invoked List View's selected objects to the current List View. Saves changes if the LinkUnlinkController.AutoCommit property is set to true.
Unlink Invoked as a result of executing the Unlink Action. Represents the Unlink Action's SimpleAction.Execute event handler. Removes the current List View's selected objects. Saves changes if the LinkUnlinkController.AutoCommit property is set to true.
UpdateActionsState Called when the LinkUnlinkController is activated. In addition, it is called when the current ListView's CollectionSource is changed, and when the current View's View.AllowNew and View.AllowDelete properties are changed. Updates the Link and Unlink Actions' active state (see ActionBase.Active).

Public members are described individually in the documentation.

Note

This Controller has the WebLinkUnlinkController descendant. It sets true for the LinkUnlinkController.AutoCommit property. If you need to implement a Web-specific functionality, inherit from this Controller. To implement a Windows Forms specific functionality, inherit from the base LinkUnlinkController.

This Controller is activated for the nested List Views that are displayed via the ListPropertyEditor. 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 LinkUnlinkController and its Link and Unlink Actions is available in the Application Model's ActionDesign node. To access it, use the Model Editor.

Inheritance

Object
Controller
ViewController
LinkUnlinkController

See Also