Log In
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Collapse]eXpressApp Framework
 [Expand]Getting Started
  [Expand]Application Solution Components
  [Expand]Business Model Design
  [Expand]Application Model
  [Collapse]UI Construction
    UI Element Overview
    Windows and Frames
    Action Containers
   [Expand]View Items
    List Editors
    Add and Override Images
    Text Notifications
    Ways to Show a Confirmation Dialog
    ASP.NET Web Application Appearance
    Application Personalization
    Using a Custom Control that is not Integrated by Default
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Ways to Show a Confirmation Dialog

This topic describes approaches to showing a confirmation dialog. You can show a simple confirmation message or a confirmation dialog with additional fields.

This topic contains the following sections.


If you want to show a simple text notification, refer to the following topics:

Expanded Using the ConfirmationMessage Property

You can change a default confirmation message for built-in or custom Actions using the ActionBase.ConfirmationMessage property in code or IModelAction.ConfirmationMessage in the Model Editor.

For example, change the confirmation message for the Delete Action as demonstrated in the following code snippet.

To see the result, click the Delete Action.

Expanded Using a New Detail View

In this section, the confirmation form is a pop-up window with the DetailView of the ConfirmationWindowParameters object, which contains a confirmation message, the accept and cancel buttons, and will be invoked in an Action's Execute event.

For example, the confirmation message, the Close and OK buttons are placed on the confirmation form. Create a class with form layout properties, such as confirmation message text and visibility of elements. Decorate this class with the DomainComponentAttribute to register it in the Types Info Subsystem.

The confirmation message will be shown in a pop-up window on an Action click. Create a new ViewController and PopupWindowShowAction in its constructor. In the Action's CustomizePopupWindowParams event, create an IObjectSpace object, a new ConfirmationWindowParameters class instance, and the DetailView for this object. Set the ConfirmationWindowParameters object's properties to the required values and the CustomizePopupWindowParamsEventArgs.View parameter to the newly created DetailView to show it in the pop-up window.

The following images demonstrate this confirmation window.

Expanded Using the Messaging Class' Methods

In WinForms applications, the confirmation window can be shown using the Messaging class' methods. This class provides you with the main features to display the confirmation message with the standard set of dialog buttons (see MessageBoxButtons).

Add the following Controller, which demonstrates a simple example of using this approach, to your WinForms Module project.

The image below demonstrates this implementation result.

Expanded See Also

How would you rate this topic?​​​​​​​