3

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?

4

2 回答 2

3

Got it:

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

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

于 2012-05-01T22:38:09.697 回答
1

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

于 2013-03-26T13:35:04.360 回答