I'm trying to use two editable slickgrid instances as a data entry form, and I'd like to be able to tab from the last cell of the first grid to the first cell of the second grid, but the following doesn't seem to work. What am I missing?
firstGrid.onKeyDown.subscribe(function(event) {
if (event.keyCode === 9 && event.shiftKey === false) {
if (firstGrid.getActiveCell().cell === lastCol) {
firstGrid.commitCurrentEdit();
secondGrid.gotoCell(0, 0, true);
}
}
});
Actually if I hit tab three times it works, but I would really like it to work with a single keypress.
Note that the first grid has only one row, which is why I don't have to test the row.