ASPxClientGridView.BatchEditRowChangesCanceling Event
Fires when a user clicks a row’s Cancel button in batch edit mode.
Declaration
BatchEditRowChangesCanceling: ASPxClientEvent<ASPxClientGridViewBatchEditRowChangesCancelingEventHandler<ASPxClientGridView>>
Event Data
The BatchEditRowChangesCanceling event's data class is ASPxClientGridViewBatchEditRowChangesCancelingEventArgs. 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 hash table that stores information about the processed row’s values. |
visibleIndex | Gets the processed row’s visible index. |
Remarks
The BatchEditRowChangesCanceling
event fires when a user clicks the Cancel command button that the grid displays within the command column of the modified row.
To allow the grid to display the Cancel button, set the ShowCancelButton property to true
.
The rowValues argument property allows you to get information about the edited row. The data cells within this row are specified by the column indexes.
rowValues = {
2: {value: 'Maria Anders', text: 'Maria Anders'}
3: {value: 'Alfreds Futterkiste', text: 'Alfreds Futterkiste'}
4: {value: 'Austria', text: 'Austria'}
}
To disable the current canceling operation, set the cancel argument property to true
.
<dx:ASPxGridView runat="server" ID="Grid" KeyFieldName="ID" AutoGenerateColumns="False" ...>
<Columns>
<dx:GridViewCommandColumn ShowCancelButton="true" />
<!-- ... -->
</Columns>
<SettingsEditing Mode="Batch" />
<ClientSideEvents BatchEditRowChangesCanceling="OnBatchEditRowChangesCanceling" />
</dx:ASPxGridView>
function OnBatchEditRowChangesCanceling(s, e) {
// ...
e.cancel = true;
}