您的位置:首页 > Web前端 > JavaScript

extjs grid布局中内容不可以被复制的解决方法

2014-03-20 14:16 183 查看
在grid内增加选项

 viewConfig:{

                enableTextSelection:true

            },

例子如下:

var grid = Ext.create('Ext.grid.Panel', {
store:store,
tbar:[
{
xtype:'textfield',width:300,
id:'tagid',
emptyText:'增加'
},
{
xtype:'button',
text:'刷新',
handler:function () {
store.load();
}
}
],
viewConfig:{
enableTextSelection:true
},
columns:[
{text:'ID', dataIndex:'id', width:40},
{text:'推荐类型', dataIndex:'type', width:100,
renderer:function (type) {
return typesArr[type];
}
},
{text:'相关ID1', dataIndex:'expand_id1', width:100},
{text:'相关名称1', dataIndex:'expand_str1', width:250},
{text:'相关ID2', dataIndex:'expand_id2', width:100},
{text:'相关名称2', dataIndex:'expand_str2', width:160},
{text:'推荐用户数', dataIndex:'count', width:100},
{text:'最后一次原因', dataIndex:'reason', width:100,renderer:function(str){return html_encode(str);}}
]
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐