Starting from version 17.1 we have introduced a new client-side FocusedCellChanging event. This event allows you to skip focusing and editing a cell.
This example demonstrates different ways to skip or prevent editing certain cells.
The main idea is to get the currently focused cell using the ASPxClientGridViewFocusedCellChangingEventArgs.cellInfo property and decide whether it is required to skip focusing or not:
This example demonstrates different ways to skip or prevent editing certain cells.
The main idea is to get the currently focused cell using the ASPxClientGridViewFocusedCellChangingEventArgs.cellInfo property and decide whether it is required to skip focusing or not:
[JavaScript]function onFocusedCellChanging(s, e){if(e.cellInfo.column.name == 'command') e.cancel = true;elseif(e.cellInfo.column.fieldName == 'SupplierID') e.cancel = true;elseif(e.cellInfo.column.fieldName == 'UnitsInStock'&& (e.cellInfo.rowVisibleIndex < 3 || e.cellInfo.rowVisibleIndex > 7)) e.cancel = true;elseif(e.cellInfo.column.fieldName == 'UnitPrice'&& s.batchEditApi.GetCellValue(e.cellInfo.rowVisibleIndex, 'UnitPrice')> 22) e.cancel = true;}