首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

extjs的gridpanel的数据内容不能复制解决方法

2012-09-05 
extjs的gridpanel的数据内容不能复制解决办法首先在主页的title下面加入style type text/css .x-sele

extjs的gridpanel的数据内容不能复制解决办法
首先在主页的title下面加入

  <style type= "text/css" >  
    .x-selectable, .x-selectable * {  
        -moz-user-select: text! important ;  
        -khtml-user-select: text! important ;  
    } 
    </style>

然后在ext-all.js后面加入下面代码

if  (!Ext.grid.GridView.prototype.templates) {  
    Ext.grid.GridView.prototype.templates = {};  
}  
Ext.grid.GridView.prototype.templates.cell =  new  Ext.Template(  
     '<td style="{style}" tabIndex="0" {cellAttr}>' ,  
     '<div {attr}>{value}</div>' ,  
     '</td>'  
);

也可以单写一个js,然后在首页中加入该js,要加在最后面;

热点排行