[code="java"]
// 代码如下,当点击元格时,修改,然后就会发送url请求.(这个是grid自动完成的.)
// 现在需要的是,不要自动发送请求,因为我修改不止一个单元格,如果每次修改一单元格都发送请求,效率太低.
// 所以想实现,修改完全后,统一提交整个grid数据(点击按钮).
plugins: Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit : 1,
});
columns : [ Ext.create('Ext.grid.RowNumberer'), {
header : '设备号',
dataIndex : 'terminalId',
flex : 1
}, {
header : '参数',
dataIndex : 'key',
flex : 1
}, {
header : '值',
dataIndex : 'value',
editor : {
xtype : 'textfield'
},
flex : 1
}, {
header : '默认值',
dataIndex : 'defaultValue',
editor : {
xtype : 'textfield'
},
flex : 1
} ]
[/code]