View Full Version : Edit new treeNode

22 Nov 2010, 12:27 PM
Since there is no getEditor() method for the treePanel. I have dynamically created my editor by doing this:

//inside a function...
new Ext.tree.TreeEditor(tree,{
id: 'editor_'+root_id

//referencing editor at a later stage
var editor = Ext.getCmp('editor_'+root_id);
editor.triggerEdit(node); //doesn't work

It does not register triggerEdit() as a method. Please help?

22 Nov 2010, 1:45 PM
Sorry, found a work around.

//inside a function...
var editor = new Ext.tree.TreeEditor(tree);
tree.editor = editor;

//referencing editor at a later stage
var editor = tree.editor;
editor.triggerEdit(node); //does work