pex
28 Jun 2007, 9:41 AM
Hello,
I want to listen to a keypress event on the grid, eg - when someone has a row selected and clicks on a key, it should fire.
I use this code:
this.on('keypress', function(e){console.log('test')});
It fires correctly when you press a key in the grid, however it also fires when you are in the paging toolbar and enter a different page nr for example. The same applies for the 'header' toolbar I have in this grid. How do I make it so it only fires when a key is pressed in the actual datagrid, and nots its header/footer toolbar?
I want to listen to a keypress event on the grid, eg - when someone has a row selected and clicks on a key, it should fire.
I use this code:
this.on('keypress', function(e){console.log('test')});
It fires correctly when you press a key in the grid, however it also fires when you are in the paging toolbar and enter a different page nr for example. The same applies for the 'header' toolbar I have in this grid. How do I make it so it only fires when a key is pressed in the actual datagrid, and nots its header/footer toolbar?