下面是一段可执行代码,在网格的编辑器中有一个按钮。我需要按钮出现在编辑器中,但是我不需要更新按钮的任何值。编辑器的更新功能似乎不再起作用。知道我可能会错过什么吗?
Ext.create('Ext.data.Store', {
storeId:'EmployeeData',
fields:['name', 'email', 'phone'],
data: [
{"name":"aaa", "email":"aaa@emp.com", "phone":"987654321"},
{"name":"bbb", "email":"bbb@emp.com", "phone":"987654321"},
{"name":"ccc", "email":"ccc@emp.com", "phone":"987654321"},
{"name":"ddd", "email":"ddd@emp.com", "phone":"987654321"}
]});
var grid = Ext.create('Ext.grid.Panel', {
title: 'Employee',
store: Ext.data.StoreManager.lookup('EmployeeData'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'},
{header: 'button', dataIndex:'',editor:{xtype:'button',editable: false}}
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
pluginId: 'rowEditing'
})
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});