I want to know if there any method to find the current cell in the grid where the user cursor is and where is currently editing content ?
Problem:
I have a grid with 4 columns and a button that allow me to add row. Everytime i click on the button and the focus/cursor are still in one cell, the content in those cell are removed. The cell need to loose the focus before to keep th content intact.
All i want to do is to detect in which cell the user is editing when the “Add row” button is hited, so i can use the “endcelledit” event to tell to the current cell to loose focus and after i could add row without any problem.
Here the add button part code :
addButton.click(function (event) {
var rowId = $('#candidatesListDisplay').jqxGrid('getselectedrowindex');
$("#candidatesListDisplay").jqxGrid('endcelledit', rowId,"office", false);
$("#candidatesListDisplay").jqxGrid('addrow', null, {});
});
In this example you can see i found the rowId and call the “endcelledit” event with “office” as column name. But if the user was in other column than “office” that cause error. I would like to detect the column so i can do a switch or if section and call “endcelledit” only for the current cell.
I hope this is clear the way i explain it…abnd thank for you help