extjs中grid的内容能够复制
2015-01-23 11:22
155 查看
Ext.define('TerminalInfoApp.view.TerminalInfoListView' ,{
extend: 'Ext.grid.Panel',
alias : 'widget.terminalInfoListView',
id:'terminalInfoListViewGrid',
title: '设备信息列表',
autoWidth: true,
autoHeight : true,
region: "center",
border: true,
frame: true,
store: "TerminalInfoListStore",
multiSelect: true,
viewConfig : {enableTextSelection:true},//grid中的内容能够复制 extjs4.0版本以上
这是第一种方法
// plugins: [
// Ext.create('Ext.grid.plugin.CellEditing', {
// clicksToEdit: 1
// })
// ],//这是第二种方法
stripeRows:true, //表格是否隔行换色,默认为false
loadMask:true, //是否在加载数据时显示遮罩效果,默认为false
selModel: { selType: 'checkboxmodel' }, //在首列實現checkbox,僅此在首列
columns: [
{ header: '序号', xtype:'rownumberer',width:50},
{ header: 'ID', flex: 0.5, dataIndex: 'id', hidden: true},
{ header: 'userid', flex: 0.5, dataIndex: 'userid', hidden: true },
{ header: '批号id', width:120, dataIndex: 'bitchnum', hidden: true},
{ header: '批号', width:120, dataIndex: 'purchno', sortable: true },
{ header: '设备编号', width:100, dataIndex: 'terminal', sortable: true
// ,editor: {xtype:'displayfield',allowBlank:false}
},
{ header: '车牌号码', width:100, dataIndex: 'carnumber', hidden: true },
extend: 'Ext.grid.Panel',
alias : 'widget.terminalInfoListView',
id:'terminalInfoListViewGrid',
title: '设备信息列表',
autoWidth: true,
autoHeight : true,
region: "center",
border: true,
frame: true,
store: "TerminalInfoListStore",
multiSelect: true,
viewConfig : {enableTextSelection:true},//grid中的内容能够复制 extjs4.0版本以上
这是第一种方法
// plugins: [
// Ext.create('Ext.grid.plugin.CellEditing', {
// clicksToEdit: 1
// })
// ],//这是第二种方法
stripeRows:true, //表格是否隔行换色,默认为false
loadMask:true, //是否在加载数据时显示遮罩效果,默认为false
selModel: { selType: 'checkboxmodel' }, //在首列實現checkbox,僅此在首列
columns: [
{ header: '序号', xtype:'rownumberer',width:50},
{ header: 'ID', flex: 0.5, dataIndex: 'id', hidden: true},
{ header: 'userid', flex: 0.5, dataIndex: 'userid', hidden: true },
{ header: '批号id', width:120, dataIndex: 'bitchnum', hidden: true},
{ header: '批号', width:120, dataIndex: 'purchno', sortable: true },
{ header: '设备编号', width:100, dataIndex: 'terminal', sortable: true
// ,editor: {xtype:'displayfield',allowBlank:false}
},
{ header: '车牌号码', width:100, dataIndex: 'carnumber', hidden: true },
相关文章推荐
- ExtJs的Ext.grid.GridPanel不能选择复制表格中的内容解决方案
- 使extjs的grid内容可复制粘贴
- ExtJs的Ext.grid.GridPanel不能选择复制表格中的内容解决方案
- extjs4 grid 实现可以选择文本内容进行复制
- 使extjs的grid内容可复制粘贴
- extjs的gridpanel的数据内容不能复制解决方法
- extjs4 grid 列根据内容长度自动换行
- ExtJs4使grid内容可复制
- Extjs grid select 选取行内容
- Extjs Grid根据行内容设置不用字体颜色
- Extjs Ext.grid.column.Column 自适应内容
- extjs的gridpanel的数据内容不能复制解决办法
- 『转』让ExtJS里的GridPanel的列能够自动决定宽度
- ExtJS中Grid的单元格内容换行扩展
- Extjs的grid表格的复制、粘贴
- extjs的gridpanel的数据内容不能复制解决办法
- ExtJs疑难杂症之GridPanel单元格不能选中复制问题
- ExtJs疑难杂症之GridPanel单元格不能选中复制问题
- ExtJs疑难杂症之GridPanel单元格不能选中复制问题
- Extjs grid 不能复制问题解决