I am using Ignite UI grid. I have to open a dialog when a specific editor is focused in new row insertion or updation. The edit mode is 'row'.
I am able to open the dialog and I am using editCellStarted event for this and binding the editor to focus event. The code is as follows:
$("#Grid").igGrid({
primaryKey: "keyCode",
autoCommit: true,
columns: _getColumnsResult,
features: [
{
name: 'Updating',
columnSettings: updateColSettings,
editMode: 'row',
editCellStarted: function (evt, ui) {
if(ui.columnKey=="Demo")
{
$("#" + ui.columnkey + " input").bind('focus', { id: ui.columnIndex}, function (e) {
$("dialog1").dialog();
});
}
},
}, //Updating feature ended
{
name: "Sorting",
type: "local",
},
{
name: "Selection",
mode: "row",
rowSelectionChanged: function (evt, ui) { Selectedrow = ui.row.index }
}]
});
Problem: When add new is clicked,if that specific column is first column, focus goes to the dialog and returns back to the editor.The focus does not remains in the dialog.
But if the column is other than first column, the code is working fine.
Please help to accomplish this. Thanks in advance.
here is the fiddle for it.