var selectionModel = grid.getSelectionModel(); var record = selectionModel.getSelected(); var unid = record.data["cttd_unid"]; 1、双击 var cb = new Ext.grid.RowSelectionModel({ singleSelect:true //如果值是false,表明可以选择多行;否则只能选择一行 }); var alarmGrid = new Ext.grid.GridPanel({ } alarmGrid.addListener('rowdblclick', rowdblclickFn); function rowdblclickFn(grid, rowindex, e){ grid.getSelectionModel().each(function(rec){ alert(rec.get(fieldName)); //fieldName,记录中的字段名 }); } 2、单击 var cb = new Ext.grid.RowSelectionModel({ singleSelect:true //如果值是false,表明可以选择多行;否则只能选择一行 }); var alarmGrid = new Ext.grid.GridPanel({ } alarmGrid.addListener('rowclick', rowclickFn); function rowclickFn(grid, rowindex, e){ grid.getSelectionModel().each(function(rec){ alert(rec.get(fieldName)); //fieldName,记录中的字段名 }); }