View Full Version : [FIXED-546][3.1.1] Can't use a single instance of an editor field in EditorGridPanel

9 Feb 2010, 12:35 PM
In version 3.1.0 I could reuse a single instance of a Field in multiple columns in EditorGridPanel. After upgrading to version 3.1.1 it no longer works. Once you go into edit mode in one of the columns, the editor field will ONLY shows up in the cells of that column.

Browser: ANY.
Operating System: ANY

Just copy the following code and run it.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link type="text/css" rel="stylesheet" href="http://extjs.cachefly.net/ext-3.1.1/resources/css/ext-all.css"/>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.1.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.1.1/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var data = [

var editor = new Ext.form.TextField();

new Ext.grid.EditorGridPanel({
store: new Ext.data.ArrayStore({
fields: ['fname', 'lname'],
data: data
columns: [
{header: 'First Name', dataIndex: 'fname', editor: editor},
{header: 'Last Name', dataIndex: 'lname', editor: editor}
title: 'EditorGrid',
width: 300,
height: 300,
renderTo: document.body

Sorry, I haven't done any debugging. Have no time.

9 Feb 2010, 8:09 PM
After some debugging and comparing files between v3.1.0 and v3.1.1 here's the suggested fix:

Ext.override(Ext.grid.Column, {
* Sets a new editor for this column.
* @param {Ext.Editor/Ext.form.Field} editor The editor to set
setEditor : function(editor){
this.editor = null;
//not an instance, create it
editor = Ext.create(editor, 'textfield');
//check if it's wrapped in an editor
// editor = new Ext.grid.GridEditor(editor);
editor.gridEditor = new Ext.grid.GridEditor(editor);
this.editor = editor.gridEditor;
} else {
this.editor = editor;
Green - old code, can be deleted
Red - new code

11 Feb 2010, 6:34 PM
Sorry for bumping, but can someone add this fix to SVN please?

11 Feb 2010, 6:37 PM
We've got a ticket open, it will be addressed, keep using your override for now.

Jamie Avins
16 Feb 2010, 1:22 PM
Fixed in SVN 6088.