View Full Version : Column's preconfigured editor destroyed after grid is destroyed.

6 Dec 2010, 3:02 PM
Ext version tested:

Ext 3.3.0


Having preconfigured class derived from EditorGridPanel with columnModel and column's editors defined, after first instance destroyed, second is not editable.

Test Case:

MyEditorGridPanel = Ext.extend( Ext.grid.EditorGridPanel, {
columns: [
{header: 'test', dataIndex: 'test', editor: {xtype:'textfield'} }

var test = new MyEditorGridPanel()

test = new MyEditorGridPanel()
test.render('test2'); // no longer editable

Debugging already done:

It seems like the orginal configuration of the column's editor is replaced by an editor instance in the Column constructor, which is later destroyed with the grid. Editor's configuration is then lost, and subsequent instances of editor grid will not be editable.

7 Dec 2010, 12:02 AM
Do NOT put complex objects in the prototype. Remeber that these will be shared by all instances!

Instead, assign the columns in the initComponent method.