Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
  • 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.
  • 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

Event Data

The QueryCloseAfterSave event's data class is QueryCloseAfterSaveEventArgs. 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