Skip to main content

ASPxClientGridView.BatchEditRowRecovering Event

Fires on the client side before a data row is recovered in batch edit mode.

Declaration

BatchEditRowRecovering: ASPxClientEvent<ASPxClientGridViewBatchEditRowRecoveringEventHandler<ASPxClientGridView>>

Event Data

The BatchEditRowRecovering event's data class is ASPxClientGridViewBatchEditRowRecoveringEventArgs. 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.
key Gets the row’s key.
rowValues Gets a hashtable that maintains information about recovered cells.
visibleIndex Gets the processed row’s visible index.

Remarks

The BatchEditRowRecovering event fires in the following cases:

The rowValues argument property allows you to get infomartion about the recovered row. The data cells within this row are specified by the column indexes.

ASPxGridView.BatchEditMode - RowDeleting

rowValues = {
    2: {value: 'Maria Anders', text: 'Maria Anders'}
    3: {value: 'Alfreds Futterkiste', text: 'Alfreds Futterkiste'}
    4: {value: 'Germany', text: 'Germany'}
}

In the BatchEditRowRecovering event handler, you can set the cancel argument property to true to cancel the current recovery operation.

In the following example, the grid does not recover the rows that contain empty cells.

<dx:ASPxGridView ID="Grid" runat="server" ClientInstanceName="ClientGrid" ...>
    <!-- ... -->
    <SettingsEditing Mode="Batch" />
    <ClientSideEvents BatchEditRowRecovering="OnBatchEditRowRecovering" />
</dx:ASPxGridView>
function OnBatchEditRowRecovering(s, e) {
    for (var columnIndex in e.rowValues) {
        if (e.rowValues[columnIndex].value === null)
            e.cancel = true;
    }
}
See Also