ASPxClientTreeList.FocusedCellChanging Event
Occurs on the client side when the focused cell is about to be changed.
Declaration
FocusedCellChanging: ASPxClientEvent<ASPxClientTreeListFocusedCellChangingEventHandler<ASPxClientTreeList>>
Event Data
The FocusedCellChanging event's data class is ASPxClientTreeListFocusedCellChangingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
cancel | Gets or sets a value indicating whether the action which raised the event should be canceled. Inherited from ASPxClientCancelEventArgs. |
cellInfo | Provides information on a cell currently being focused. |
Remarks
The FocusedCellChanging event is raised when an end-user moves focus from one cell to another. This event allows you to prevent focusing and editing a cell (including command cells) according to the specified conditions.
Note that the FocusedCellChanging event is in effect only in Batch Edit Mode.
The following example demonstrates different ways to skip or prevent editing certain cells.
function onFocusedCellChanging(s, e) {
if (e.cellInfo.column.name == 'command')
e.cancel = true;
else if (e.cellInfo.column.fieldName == 'DateCreated')
e.cancel = true;
else if (e.cellInfo.column.fieldName == 'From' && (e.cellInfo.nodeKey < 3 || e.cellInfo.nodeKey > 7))
e.cancel = true;
}
See Also