zerkms
zerkms

Reputation: 255155

Keypress or keydown event handling in grid

How to handle those events in grid?

Obvious solutions like

grid.on('keypress', handler);  

or

listeners: { keypress: handler }  

don't work - handler is not being triggered.

What am I missing?

Upvotes: 3

Views: 6973

Answers (2)

Gabriel Hautclocq
Gabriel Hautclocq

Reputation: 3320

You can try the itemkeydown event of Ext.grid.View.

Upvotes: 1

zerkms
zerkms

Reputation: 255155

Got it:

grid.view.addElListener('keypress', function() {
    ...
});

PS: also formed it as a separated grid plugin: https://gist.github.com/2572486

Upvotes: 3

Related Questions