Extjs-如何用鼠标右键选择网格中的行

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Extjs-如何用鼠标右键选择网格中的行相关的知识,希望对你有一定的参考价值。

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);

以上是关于Extjs-如何用鼠标右键选择网格中的行的主要内容,如果未能解决你的问题,请参考以下文章