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

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 },
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: