ASPxClientGridViewBatchEditApi.RecoverRow(visibleIndex) Method
Recovers the specified row.
Declaration
RecoverRow(
visibleIndex: number
): void
Parameters
Name | Type | Description |
---|---|---|
visibleIndex | number | The row’s visible index. |
Remarks
When the grid is in batch edit mode, call the RecoverRow
method to recover the row that 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 rowVisibleIndices = batchApi.GetRowVisibleIndices(true);
for (var i = 0; i < rowVisibleIndices.length; i++) {
var visibleIndex = rowVisibleIndices[i];
if (batchApi.IsDeletedRow(visibleIndex)) {
batchApi.RecoverRow(visibleIndex);
}
}
}
See Also