hi Gray, I found it happen when there are morn than 1 grid in the view, the plugin will cause the error.
my custom grid
Ext.define('test.view.myGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.myGrid',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: '', dataIndex: 'name', flex: 1, align: 'center' },
{ text: 'title', dataIndex: 'title', width: 60, align: 'center', xtype: 'booleancolumn' },
{ text: 'tooltip', dataIndex: 'tooltip', width: 60, align: 'center', xtype: 'booleancolumn' },
{ text: 'Label', dataIndex: 'label', width: 140, align: 'center', editor: 'textfield' },
{ text: 'Maxlength', dataIndex: 'maxlength', width: 70, align: 'center', editor: 'textfield' },
{ text: 'Order', dataIndex: 'displayorder', width: 60, align: 'center', editor: 'textfield' }
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
pluginId: 'plugin1'
})
],
width: 450,
forceFit: true,
initComponent: function () {
this.callParent(arguments);
}
});
my custom grid
Ext.define('test.view.myGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.myGrid',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: '', dataIndex: 'name', flex: 1, align: 'center' },
{ text: 'title', dataIndex: 'title', width: 60, align: 'center', xtype: 'booleancolumn' },
{ text: 'tooltip', dataIndex: 'tooltip', width: 60, align: 'center', xtype: 'booleancolumn' },
{ text: 'Label', dataIndex: 'label', width: 140, align: 'center', editor: 'textfield' },
{ text: 'Maxlength', dataIndex: 'maxlength', width: 70, align: 'center', editor: 'textfield' },
{ text: 'Order', dataIndex: 'displayorder', width: 60, align: 'center', editor: 'textfield' }
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
pluginId: 'plugin1'
})
],
width: 450,
forceFit: true,
initComponent: function () {
this.callParent(arguments);
}
});
my main view
......
items: [
{
title: 'Project',
items: [
{
xtype: 'myGrid',
itemId: 'id1'
},
{
xtype: 'myGrid',
itemId: 'id2'
}
]
}
Do I missing some setting? Thanks,
Aucun commentaire:
Enregistrer un commentaire