有两个小属性,如下

this.on('rowdblclick', this.readContent, this);

this.on('cellclick', this.gridCellClick, this);  //第一个是单机双击事件,触发的事件,第二个是相应的方法,第三个是作用的范围

readContent : function(grid, rowIndex, e) {  //第一个是当前grid,第二个是当前行,第三个是参数
        var rec = grid.getStore().getAt(rowIndex);   //获取当前行的数据
        if (rec == undefined) {
            Ext.Msg.alert("提示", "每次只能且必须查看一条记录");
        }

gridCellClick : function(grid, rowIndex, columnIndex, e) {
        if (columnIndex == 2) {
            this.readContent(grid, rowIndex, e);
        }

    }

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2021-12-10
  • 2021-12-06
  • 2022-12-23
  • 2022-01-27
  • 2021-08-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-11
  • 2022-02-25
  • 2021-06-05
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案