日期:2014-05-16  浏览次数:20441 次

ExtJS grid中显示行数据提示信息tip
 custGrid.on('render', function(grid) {   
       var store = grid.getStore();  
       var view = grid.getView();       
       grid.tip = new Ext.ToolTip({   
           target: view.mainBody,      
           delegate: '.x-grid3-row', 
           trackMouse: true,     
           renderTo: document.body,   	     
           listeners: {   
               beforeshow: function updateTipBody(tip) {   
                   var rowIndex = view.findRowIndex(tip.triggerElement);   
                   var record = store.getAt(rowIndex);
                   tip.body.dom.innerHTML = 
'ID:'+record.get('custId')+
'<br/>NO:'+record.get('custName')+
'<br/>Address:'+record.get('address')+
'<br/>Mobile:'+record.get('mobile');   
               }   
           }   
       });   
   });    
1 楼 jiajiafucs 2011-11-01  
js