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);}}
]
});
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);}}
]
});
相关文章推荐
- 虚拟机可以共享目录,但不能复制粘贴的解决方法
- 网页内容无法复制(一些基本的解决方法)
- extjs的gridpanel的数据内容不能复制解决方法
- 网页内容无法复制解决方法,怎么复制被保护的网页内容
- Eclipse复制javaweb项目后需要修改的内容(解决server视图中项目名后有括号为原项目名的方法)
- 用csv导出文件时,每个cell加上双引号后,可以原样输入cell中的内容,不管是否cell中是否包含逗号或者换行,但是如果包含双引号,则换行失效,解决方法如下
- 关于从网上复制一些网页内容的时候,会提示需要注册才能复制的解决方法
- PDF内容不允许复制的解决方法!
- 解决360doc网站不登录就无法复制内容的方法
- ckeditor:复制内容到ckeditor时,只保留文本,忽略其样式解决方法
- android 解决输入法键盘遮挡布局内容方法
- QMainWindow中直接添加LayOut是不可以的(解决方法看文章内容)
- 解决网站内容不能复制的方法
- DEDE内容页图片过大导致布局混乱的解决方法
- 360doc网站不登录就无法复制内容的解决方法
- 解决网页内容无法复制的方法
- 自己写的递归方法复制文件夹里面的内容(从源文件(里面可以有多个层次的子文件夹)到一个文件夹)
- discuz插件, xml 语言包 里面的内容调整,修改后没变化的解决方法
- h5学习之10(html中页面内容布局的方法流式布局,浮动布局,定位布局,弹性布局)
- php 文件下载 出现下载文件内容乱码损坏的解决方法