在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);}}
]
});