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

GridViewBatchEditSettings.KeepChangesOnCallbacks Property

Specifies whether the grid keeps changes on callbacks in batch edit mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean KeepChangesOnCallbacks { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

True to keep changes on callbacks.
False to reset changes on callbacks.
Default to determine the control’s behavior based on the DataControlBatchEditKeepChangesOnCallbacksDefaultValue property value.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Property Paths

You can access this nested property as listed below:

Object Type Path to KeepChangesOnCallbacks
ASPxGridViewEditingSettings
.BatchEditSettings .KeepChangesOnCallbacks

Remarks

In batch edit mode, the grid allows a user to edit batches of grid data on multiple pages and send them to the server in a single request. To support this functionality, the grid keeps changes on callbacks when a user interacts with unsaved modified data (for instance, when a user navigates to another page within the grid or sorts data).

The enabled KeepChangesOnCallbacks property also allows the grid to display the Preview Changes button. When a user clicks this button, the grid shows only modified rows from all grid pages.

ASPxGridView.BatchEditMode - PreviewChangesButton ASPxGridView.BatchEditMode - HideChangesButton

When the KeepChangesOnCallbacks property is disabled, the grid behaves as follows:

  • Does not display the Preview Changes button.

  • Shows the Confirmation dialog box on callbacks (the ShowConfirmOnLosingChanges property) to confirm user interactions with unsaved modified data.

    ASPxGridView.BatchEditMode - ConfirmationMessage

    <dx:ASPxGridView ID="ASPxGridView1" runat="server" KeyFieldName="ProductID">
      <%--...--%>
      <SettingsEditing Mode="Batch">
          <BatchEditSettings EditMode="Cell" KeepChangesOnCallbacks="False"/>
      </SettingsEditing>
    </dx:ASPxGridView>
    

If the KeepChangesOnCallbacks property is set to Default, the control’s behavior is based on the DataControlBatchEditKeepChangesOnCallbacksDefaultValue property value.

ASPxWebControl.BackwardCompatibility.DataControlBatchEditKeepChangesOnCallbacksDefaultValue = false;

Run Demo: ASPxGridView - Batch Editing and Updating

See Also