extjs中为表格添加单选行单元格的事件

extjs中为表格添加单选行单元格的事件

grid.addListener('cellclick', cellclick);
 function cellclick(grid, rowIndex, columnIndex, e) {
  var record = grid.getStore().getAt(rowIndex);
  var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
  var data = record.get(fieldName);
  if(data==null){ //处理预览 
   var alias=record.get("Alias");
   window.open(url);
   //window.location.href="DoIpcammera?dowith=preview&&alias="+alias;
  }
 }

你可能感兴趣的:(extjs中为表格添加单选行单元格的事件)