ASPxClientGridViewBatchEditApi.GetDeletedRowIndices Method
Gets the visible indexes of the rows deleted on the current page.
Declaration
GetDeletedRowIndices(): number[]
Returns
Type | Description |
---|---|
number[] | Visible indexes of the deleted rows. |
Remarks
In batch edit mode, call the client-side GetDeletedRowIndices
method to get the visible indexes of the rows deleted on the current page.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" KeyFieldName="ProductID">
<%--...--%>
<SettingsEditing Mode="Batch" />
<ClientSideEvents BatchEditChangesSaving="OnBatchEditChangesSaving" />
</dx:ASPxGridView>
function OnBatchEditChangesSaving(s, e) {
// Get the number of deleted rows on the current page
var deletedRowCount = s.batchEditApi.GetDeletedRowIndices().length;
alert(`The number of deleted rows on the current page: ${deletedRowCount}.`);
}
To get information about all deleted rows in the grid in batch edit mode, use the deletedValues argument property in the BatchEditChangesSaving event handler or call the client-side GetUnsavedChanges method.
For more information on the grid in batch edit mode, refer to the following topic: ASPxGridView - Batch Edit Mode.
Limitation
- A
GetDeletedRowIndices
method call produces no effect if the grid is in Preview Changes mode.
See Also