Search code examples
extjskeyboard-eventsgridpanel

How to change the behavior of the keyboard navigation on a Ext.grid.EditorGridPanel (ExtJs)?


I have a Ext.EditorGridPanel (with Ext.grid.RowSelectionModel) class with four columns and many rows. The user is allowed to edit the cells, but after edit it and press ENTER or TAB, I want that the cell editor opens automatically on the next row (not the next column, as the default is), at the same column index.

I tried to use the method startEditing(row,column) on afteredit event, but without success.

Any suggestion? Thank you.


Solution

  • Use the keys config option of the editorgrid. It accepts an Object of KeyMap. Check the docs here. If that doesn't work, catch keypress event and check if the key matches Ext.EventObject.ENTER then do your thing!