PDA

View Full Version : edit tree node



midodjo
16 Nov 2012, 9:25 AM
How to edit a child node of a Ext.tree.panel(Extjs.tree.panel)???

mitchellsimoens
19 Nov 2012, 9:26 AM
More info please.

midodjo
20 Nov 2012, 12:23 AM
when i double click in a node in tree i want to edit the text of the node

Farish
20 Nov 2012, 1:06 AM
on itemdblclick event of the tree panel, you can create e.g. a popup where the new text can be entered. or if you already have the text, you can do the following:


var node = tree.getSelectionModel().getSelection()[0]; // get selected node
node.set('text', newText);

where newText is the variable containing the text string which you want to display in your tree node.