Posted By

jvandemerwe on 10/19/10


Tagged

js event manager Ext listeners mouseclick


Versions (?)

Extjs - how to select a row in a grid with a right-mouse click


 / Published in: JavaScript
 

This refers to Ext JS version 3 !

  1. // add a listener to the grid and add the following lines
  2. this.on('rowcontextmenu', function(grid, row, e) {
  3. grid.selectedNode = grid.store.getAt(row); // we need this
  4. if((row) !== false) {
  5. this.getSelectionModel().selectRow(row);
  6. }
  7. ... and the rest of your code ...
  8.  
  9. }, this);

Report this snippet  

You need to login to post a comment.