EXTJS-GridPanel双击行 事件

 

EXTJS-GridPanel双击行 事件

标签: function
  9146人阅读  评论(0)  收藏  举报
  分类:
EXTJS(3) 
[javascript]  view plain  copy
 print ?
  1. var grid = new Ext.grid.GridPanel({  
  2.     ........,  
  3.     listeners:{  
  4.                 'rowdblclick' : function(grid, rowIndex, e){  
  5.                     grid.getSelectionModel().clearSelections();  
  6.                     grid.getSelectionModel().selectRow(rowIndex);  
  7.                     // alert(rowIndex+'---'+grid.id);  
  8.                    
[javascript]  view plain  copy
 print ?
  1.             //下面为各种数据的获取方式,总有一种适合你  
  2.                       var record=grid.getSelectionModel().getSelected();  
  3.                     // alert(grid.getView().getHeaderCell(0).name);  
  4.                    
  5.                      /* 
  6.                      var row = grid.getView().getRow(rowIndex); 
  7.                      alert(row.get("Name")); 
  8.                      */  
  9.                      /* 
  10.                     var record=grid.getSelectionModel().getSelected(); 
  11.                      alert(record.get('Name')); 
  12.                     */  
  13.                     /* 
  14.                     grid.getSelectionModel().each(function(rec){    
  15.                  alert(rec);  
  16.                }); 
  17.             */  
  18.              }  
  19.             }  
  20. });  
  21.    

 关键代码如下:

你可能感兴趣的:(ExtJs)