The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.
.NET Core 3.0+
The page you are viewing does not exist in the .NET Core 3.0+ platform documentation. This link will take you to the parent topic of the current section.

WebModificationsController.QueryCloseAfterSave Event

Occurs when the ModificationsController.SaveAndCloseAction is executed.

Namespace: DevExpress.ExpressApp.Web.SystemModule

Assembly: DevExpress.ExpressApp.Web.v19.2.dll

Declaration

public event EventHandler<QueryCloseAfterSaveEventArgs> QueryCloseAfterSave
Public Event QueryCloseAfterSave As EventHandler(Of QueryCloseAfterSaveEventArgs)

Event Data

The QueryCloseAfterSave event handler receives an argument of the QueryCloseAfterSaveEventArgs type. The following properties provide information specific to this event.

Property Description
CloseAfterSave Specifies whether to close the current Detail View after executing the ModificationsController.SaveAndCloseAction in ASP.NET Web applications.

Remarks

Handle this event to close the current Detail View, after executing the ModificationsController.SaveAndCloseAction in ASP.NET Web applications. For this purpose, set the QueryCloseAfterSaveEventArgs.CloseAfterSave property to true.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Web.SystemModule;
//...
public partial class MyController : ViewController {
    protected override void OnActivated() {
        base.OnActivated();
        WebModificationsController controller = Frame.GetController<WebModificationsController>();
        if (controller != null) {
            controller.QueryCloseAfterSave += OnQueryCloseAfterSave;
        }
    }
    private void OnQueryCloseAfterSave(object sender, QueryCloseAfterSaveEventArgs e) {
        e.CloseAfterSave = true;
    }
    protected override void OnDeactivated() {
       WebModificationsController controller = Frame.GetController<WebModificationsController>();
        if (controller != null) {
            controller.QueryCloseAfterSave -= OnQueryCloseAfterSave;
        }
        base.OnDeactivated();
    }
}
See Also