ExtJS4.x Grid 儲存格滑鼠移至上方提示

來源:互聯網
上載者:User

標籤:

 1 //每一個列都會出現滑鼠懸浮上去顯示內容 2 /**  3  * //適用於Extjs4.x 4 * @class Ext.grid.GridView  5 * @override Ext.grid.GridView  6 * GridPanel儲存格不能選中複製問題  7 * 儲存格資料顯示不完整 ,增加title 浮動提示資訊  8 */  9 Ext.override(Ext.grid.GridPanel, {10     afterRender : Ext.Function.createSequence(Ext.grid.GridPanel.prototype.afterRender,11         function() {12             /* 預設顯示提示13             if (!this.cellTip) {14                 return;15             }*/16             17             var view = this.getView();18             19             this.tip = new Ext.ToolTip({20                 target: view.el,21                 delegate : ‘.x-grid-cell-inner‘,22                 trackMouse: true, 23                 renderTo: Ext.getBody(),  24                 listeners: {  25                     beforeshow: function updateTipBody(tip) {26                         //取cell的值27                         //fireFox  tip.triggerElement.textContent28                         //IE  tip.triggerElement.innerText 29                         var tipText = (tip.triggerElement.innerText || tip.triggerElement.textContent);30                         if (Ext.isEmpty(tipText) || Ext.isEmpty(tipText.trim()) ) {31                             return false;32                         }33                         34                         tip.update(tipText);35                     }36                 }37             });38         })39 });

 

ExtJS4.x Grid 儲存格滑鼠移至上方提示

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.