PDA

View Full Version : rowEditor uncaught TypeError



webarnie
28 Mar 2011, 11:52 AM
I am using a roweditor on a page. One of the columns is a combo box and first time in everything works fine. If I close the page and come back in, the initiliztion logic is not run and as a result an exception is thrown :
Uncaught TypeError: Cannot call method 'setValue' of undefined
Line 169.



if(!this.rendered){
this.render(view.getEditorParent()); //This does not run the second time
}
var w = Ext.fly(row).getWidth();
this.setSize(w);
if(!this.initialized){
this.initFields(); // this is not run the second time
}
var cm = g.getColumnModel(), fields = this.items.items, f, val;
for(var i = 0, len = cm.getColumnCount(); i < len; i++){
val = this.preEditValue(record, cm.getDataIndex(i));
f = fields[i];
f.setValue(val); // f is undefined causing the error



has this problem been reported? has this problem been fix? is there a work around? or am i doing something wrong?

kandy
19 Jul 2011, 5:10 AM
RowEditor expect them all editors extend Ext.form.Field
Verify is right for your configuration