ASPxClientGridViewBatchEditApi Class
Provides members related to Batch Edit Mode
Declaration
declare class ASPxClientGridViewBatchEditApi
Remarks
These members can be accessed via the ASPxClientGridView.batchEditApi property.
Refer to the Batch Edit Mode (Web Forms) and Batch Edit Mode (MVC) topic for more information.
Example
Note
For a full example, see ASP.NET - Handle the client-side FocusedCellChanging event to prevent an edit action for ASPxGridView cells online example.
This example demonstrates different ways to skip or prevent editing certain cells. In this example, the ASPxClientGridViewBatchEditApi property provides access to the ASPxClientGridViewBatchEditApi.GetCellValue property that is used to get cell value.
function onFocusedCellChanging(s, e) {
if (e.cellInfo.column.name == 'command')
e.cancel = true;
else if (e.cellInfo.column.fieldName == 'SupplierID')
e.cancel = true;
else if (e.cellInfo.column.fieldName == 'UnitsInStock' && (e.cellInfo.rowVisibleIndex < 3 || e.cellInfo.rowVisibleIndex > 7))
e.cancel = true;
else if (e.cellInfo.column.fieldName == 'UnitPrice' && s.batchEditApi.GetCellValue(e.cellInfo.rowVisibleIndex, 'UnitPrice') > 22)
e.cancel = true;
}
Online Examples
Web Forms approach:
- ASPxGridView - Batch Editing - How to update summaries when HighlightDeletedRows=true
- ASPxGridView - Batch Edit - How to calculate values on the fly
- ASPxGridView - Batch Edit - How to calculate unbound column and total summary values on the fly
- ASPxGridView - How to select a checkbox in a row if DataItemTemplate or BatchEdit is used
*
MVC approach: