当前位置: 代码迷 >> JavaScript >> ExtJS grid中展示行数据提示信息tip
  详细解决方案

ExtJS grid中展示行数据提示信息tip

热度:94   发布时间:2012-11-20 09:55:43.0
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
  相关解决方案