A newer version of this page is available. Switch to the current version.

ASPxClientGridView.BatchEditStartEditing Event

Occurs when a grid switches to batch edit mode.

Declaration

BatchEditStartEditing: ASPxClientEvent<ASPxClientGridViewBatchEditStartEditingEventHandler<ASPxClientGridView>>

Event Data

The BatchEditStartEditing event's data class is ASPxClientGridViewBatchEditStartEditingEventArgs. 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.
focusedColumn Gets the grid column that owns a cell that is about to be edited.
key Gets the row’s key.
rowValues Gets a hashtable that maintains information about editable cells.
visibleIndex Gets the visible index of the row whose cells are about to be edited.

Remarks

The BatchEditStartEditing event is raised when the grid enters the edit mode (for a cell/row) due to an end-user interaction or programmatic call to the ASPxClientGridViewBatchEditApi.StartEdit method. The event provides arguments that allow you to prevent switching a particular cell to the edit mode.

When the GridViewBatchEditSettings.EditMode property is set to Cell, you can set the ASPxClientCancelEventArgs.cancel argument to true to prevent editing the current cell.

function Grid_BatchEditStartEditing(s, e) {
   ...
   e.cancel = true;
}

When the GridViewBatchEditSettings.EditMode property is set to Row, you can prevent switching particular cells to edit mode using the ASPxClientGridViewBatchEditStartEditingEventArgs.rowValues event argument. This is a hashtable that maintains information about editable cells. You can prevent displaying editors for particular cells by removing the corresponding entries from rowValues.

function Grid_BatchEditStartEditing(s, e) {
   ...
   delete e.rowValues[myColumn.index];
}
See Also