Hi Martin, thanks for the sample. It worked perfectly. I did make a few changes to capture arrow right/left. I don't suppose there's a way to capture tab left?
customKeydown(e) {
if (
e.targetType === "dataCell" &&
(e.event.key.toLowerCase() === "tab" ||
e.event.key.toLowerCase() === "arrowright" ||
e.event.key.toLowerCase() === "arrowleft")
) {
e.event.preventDefault();
e.cancel = true;
let cellPosition: ICellPosition = null;
if (
e.event.key.toLowerCase() === "arrowright" ||
e.event.key.toLowerCase() === "tab"
) {
cellPosition = this.grid.getNextCell(
e.target.rowIndex,
e.target.visibleColumnIndex,
(col) => col.editable
);
}
if (e.event.key.toLowerCase() === "arrowleft") {
cellPosition = this.grid.getPreviousCell(
e.target.rowIndex,
e.target.visibleColumnIndex,
(col) => col.editable
);
}
this.grid.navigateTo(
cellPosition.rowIndex,
cellPosition.visibleColumnIndex,
(obj) => obj.target.nativeElement.focus()
);
}
}