Back to Devexpress

DialogController.Accepting Event

expressappframework-devexpress-dot-expressapp-dot-systemmodule-dot-dialogcontroller-2ac8ec8d.md

latest5.6 KB
Original Source

DialogController.Accepting Event

Occurs when executing the current Dialog Controller’s DialogController.AcceptAction.

Namespace : DevExpress.ExpressApp.SystemModule

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public event EventHandler<DialogControllerAcceptingEventArgs> Accepting
vb
Public Event Accepting As EventHandler(Of DialogControllerAcceptingEventArgs)

Event Data

The Accepting event's data class is DialogControllerAcceptingEventArgs. The following properties provide information specific to this event:

PropertyDescription
AcceptActionArgsArguments passed to the DialogController.AcceptAction‘s Execute event.
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
ShowViewParametersProvides access to the ShowViewParameters object used to specify a View to be displayed after executing the DialogController.Accepting event.

Remarks

Executing the Action specified by the Dialog Controller’s DialogController.AcceptAction property results in the following, by default:

Handle the Accepting event to perform custom actions before the default actions defined above are executed. To cancel executing the default actions, set the handler’s DialogControllerAcceptingEventArgs.Cancel parameter to true (by default, it is set to false ).

If you need to cancel execution of either the Save Action or closing the current pop-up Window (see above), use the DialogController.SaveOnAccept and DialogController.CanCloseWindow properties.

Note

The Action specified by the DialogController.AcceptAction property is executed both when pressing the pop-up Window’s accept button and when double-clicking an object selected in the Window’s List View.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Accepting event.

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.

xaf-how-to-save-the-currently-opened-view-as-a-new-view-variant-at-runtime/CS/EF/ViewVariantSaveEF/ViewVariantSaveEF.Module/Controllers/UserViewVariantsController.cs#L115

csharp
DialogController dialogController = Application.CreateController<DialogController>();
dialogController.Accepting += dialogController_Accepting;
dialogController.Tag = mode;

XAF_how-to-show-filter-dialog-before-listview/CS/EFCore/DialogBeforeListViewEF/DialogBeforeListViewEF.Win/Controllers/WinShowFilterDialogController.cs#L49

csharp
DialogController dialogCotnroller = Application.CreateController<DialogController>();
dialogCotnroller.Accepting += new EventHandler<DialogControllerAcceptingEventArgs>(dialogCotnroller_Accepting);
dialogCotnroller.Cancelling += dialogCotnroller_Cancelling;

See Also

DialogController Class

DialogController Members

DevExpress.ExpressApp.SystemModule Namespace