Skip to main content

ASPxClientGridViewBatchEditApi.IsDeletedRowByKey(key) Method

Indicates whether the specified row is marked as deleted in batch edit mode.

Declaration

IsDeletedRowByKey(
    key: any
): boolean

Parameters

Name Type Description
key any

The row’s key value.

Returns

Type Description
boolean

true if the row is marked as deleted; otherwise, false.

Remarks

Call the IsDeletedRowByKey method to determine if the specified row is marked as deleted.

<dx:ASPxGridView ID="Grid" ClientInstanceName="ClientGrid" runat="server" ...>
    <!-- ... -->
    <SettingsEditing Mode="Batch" />
</dx:ASPxGridView>
<br />
<dx:ASPxButton ID="RecoverButton" runat="server" Text="Recover rows" AutoPostBack="false">
    <ClientSideEvents Click="OnRecoverButtonClick" />
</dx:ASPxButton>
function OnRecoverButtonClick(s, e) {
    var batchApi = ClientGrid.batchEditApi;
    var selectedRowKeys = ClientGrid.GetSelectedKeysOnPage();
    for (var i = 0; i < selectedRowKeys.length; i++) {
        var rowKey = selectedRowKeys[i];
        if (batchApi.IsDeletedRowByKey(rowKey)) {
            batchApi.RecoverRowByKey(rowKey);
        }
    }
}
See Also