A newer version of this page is available. Switch to the current version.

ASPxClientGridView.BatchEditChangesCanceling Event

Occurs on the client side before data changes are canceled in batch edit mode.


BatchEditChangesCanceling: ASPxClientEvent<ASPxClientGridViewBatchEditChangesCancelingEventHandler<ASPxClientGridView>>

Event Data

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

Property Description
cancel Gets or sets a value indicating whether the action which raised the event should be canceled. Inherited from ASPxClientCancelEventArgs.
deletedValues Gets a hashtable that maintains information about deleted cells.
insertedValues Gets a hashtable that maintains information about inserted cells.
updatedValues Gets a hashtable that maintains information about updated cells.


The ASPxGridView control allows you to modify a batch of grid data on the client side and send it to the server in a single request. All user changes are maintained on the client side until the Save changes button is clicked, or all changes are canceled by clicking the Cancel changes button.

The BatchEditChangesCanceling event occurs when an end-user has clicked the Cancel changes command button. The event argument properties allow you to obtain information about inserted, deleted, and updated cells. To cancel the current operation, set the event parameter's cancel property to true.


The grid does not raise the BatchEditChangesCanceling event if there are no any changes in the grid.


This example illustrates how to use the BatchEditChangesCanceling event.

function onBatchEditChangesCanceling(s, e) {
    var updValues = e.updatedValues;
    for (var rowIndex in updValues) {
        for (var columnIndex in updValues[rowIndex]) {
            var visibleIndex = parseInt(rowIndex);
            var columnId = parseInt(columnIndex);
            var initialVal = grid.batchEditApi.GetCellValue(visibleIndex, columnId, true);
            var rateColumn, barColumn, templateColumn;
            if (columnId == rateColumnIndex) {
                rateColumn = grid.GetColumn(rateColumnIndex);
                SetColValue(visibleIndex, rateColumn, initialVal);
            else if (columnId == barColumnIndex) {
                barColumn = grid.GetColumn(barColumnIndex);
                SetBarColValue(visibleIndex, barColumn, initialVal);
            else if (columnId == templateColumnIndex) {
                templateColumn = grid.GetColumn(templateColumnIndex);
                SetHtmlTemplateColumnValue(visibleIndex, templateColumn, initialVal);
See Also