Skip to main content
A newer version of this page is available. .

ASPxClientGridView.BatchEditConfirmShowing Event

Enables you to prevent a batch edit confirmation message from being displayed.

Declaration

BatchEditConfirmShowing: ASPxClientEvent<ASPxClientGridViewBatchEditConfirmShowingEventHandler<ASPxClientGridView>>

Event Data

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

Property Description
cancel Specifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs.
requestTriggerID Gets the client identifier of an object that initiates a send request.

Remarks

In the batch edit mode, if the GridBatchEditSettings.ShowConfirmOnLosingChanges property is true (the default behavior), a confirmation dialog is displayed when a grid page contains modified values and an end-user tries to send a request, for instance, to sort grid data. The BatchEditConfirmShowing event occurs before displaying this confirmation dialog and allows you to cancel its display, if required.

For instance, you may want to prevent the batch edit confirmation dialog from being displayed if you place the ASPxGridView into an ASPxCallbackPanel together with other controls (such as ASPxTabControl, ASPxButton, etc.), and some of these controls (but not the ASPxGridView) initiates the panel update by calling the ASPxCallbackPanel’s client ASPxClientCallbackPanel.PerformCallback method. In this case, you can set a client flag in the initiator control’s client event handler, and then analyze this flag within a handler of the BatchEditConfirmShowing event. The event argument’s ASPxClientGridViewBatchEditConfirmShowingEventArgs.requestTriggerID property will give you the ID of the ASPxCallbackPanel whose client PerformCallback method has been called. In the event handler, you can set the ASPxClientCancelEventArgs.cancel property to true to prevent display of the grid confirmation dialog. Note that setting the ASPxClientCancelEventArgs.cancel property to true prevents showing a default confirmation window, rather than cancelling a current callback operation.

function Grid_BatchEditConfirmShowing(s, e) {
    if(e.requestTriggerID === "MyCallbackPanel" && myFlag)
        e.cancel = true;
}

Note

We recommend that you don’t cancel the BatchEditConfirmShowing event unconditionally on every request to the server.

See Also