ASPxClientGridViewBatchEditApi.GetEditCellInfo Method
Gets information about the cell currently being edited.
Declaration
GetEditCellInfo(): ASPxClientGridViewCellInfo
Returns
Type | Description |
---|---|
ASPxClientGridViewCellInfo | An ASPxClientGridViewCellInfo object containing information about a cell. |
Remarks
Example
Note
Refer to the following online samples:
var preventEndEditOnLostFocus = false;
function C1spinEdit_KeyDown(s, e) {
var keyCode = ASPxClientUtils.GetKeyCode(e.htmlEvent);
if (keyCode === ASPx.Key.Esc) {
var cellInfo = grid.batchEditApi.GetEditCellInfo();
window.setTimeout(function () {
grid.SetFocusedCell(cellInfo.rowVisibleIndex, cellInfo.column.index);
}, 0);
s.GetInputElement().blur();
return;
}
if (keyCode !== ASPx.Key.Tab && keyCode !== ASPx.Key.Enter) return;
var moveActionName = e.htmlEvent.shiftKey ? "MoveFocusBackward" : "MoveFocusForward";
if (grid.batchEditApi[moveActionName]()) {
ASPxClientUtils.PreventEventAndBubble(e.htmlEvent);
preventEndEditOnLostFocus = true;
}
}
function C1spinEdit_LostFocus(s, e) {
if (!preventEndEditOnLostFocus)
grid.batchEditApi.EndEdit();
preventEndEditOnLostFocus = false;
}
See Also