View Full Version : UP down Arrow key on Ext Grid Panel

29 Apr 2010, 1:51 PM
I have an Ext grid panel in a frame and it moves the row selection up and down when up and arrow button are pressed. But this doesn't work when grid does not have focus and arrow key is pressed in some other frame. I need to somehow manually move the cursor up and down and will appreciate if somebody can let me know what handler is called when arrow buttons are pressed so that I can directly call those handlers or just let me know some other approach to achieve this.


18 Jun 2010, 9:04 AM
Currently working on this, it seems hard, but I might not be looking at the right spot, if I figure it out I will let you know.

18 Jun 2010, 9:51 AM
This works for me:

var map = new Ext.KeyMap("containerdivname", [
key: Ext.EventObject.UP,
fn: function(){ MyGrid.getSelectionModel().selectPrevious(); }
key: Ext.EventObject.DOWN,
fn: function(){ MyGrid.getSelectionModel().selectNext();}