PDA

View Full Version : The Problem about "column.getEditor is not a function"



bill_chuang
21 May 2012, 12:15 AM
Now I encountered a problem when I use the Ext.grid.Panel
I added a checkbox column using selModel and I want to edit the 2th column so I added a textfield column and cellediting plugin.
below is the class I defined my grid panel:



Ext.define('MyExtView.view.MySymptomSelectList' ,{

extend: 'Ext.grid.Panel',

alias : 'widget.SymptomSelectList',
store:'SymptomStore',
border:0,
layout:'auto',
autoScroll:true,
frame:true,
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing',{
clicksToEdit: 1
})
],
initComponent: function() {
this.selModel = Ext.create('Ext.selection.CheckboxModel');
this.columns = [{
header: '??',
dataIndex: 'symptom_id',
flex: 1
}, {
header: '????',
dataIndex: 'selectable_symptom',
flex: 1
}, {
header: '?????',
dataIndex:'symptom_similarity',
flex:1,
field:{
xtype:'textfield',
allowBlank:false
}
}];
this.callParent(arguments);
}});

But when I select the checkbox ,the error occurs in the firebug which is
"column.getEditor is not a function"
below is image of the window:
35443

scottmartin
21 May 2012, 7:04 AM
Several comments:

Please remove layout and autoscroll from your grid. This is for panels that are containers for other items.

You do not have editors defined for your columns. See the following:
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/grid/cell-editing.js

You have to records selected, which record to do you expect to be edited?

Regards,
Scott.