The LinkUnlinkController is intended for presenting the Link and Unlink Actions.
In a Windows Forms application:
In an ASP.NET Web Forms application:
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 | View node that is referenced by IModelPropertyEditorLinkView.LinkView property of the current List Property Editor’s Views | <DetailView> | Items | <PropertyEditor> node. If this property is not specified, the current List View’s node is used for creating the Link Action’s pop-up Window.|
|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.
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the LinkUnlinkController class.
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.