Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET 6.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.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Web

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 Forms applications.

Remarks

Handle this event to close the current Detail View, after executing the ModificationsController.SaveAndCloseAction in ASP.NET Web Forms 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