Hybrid View
-
3 Oct 2011 7:49 AM #1
Interactive elements on TreeNode
Interactive elements on TreeNode
Hi.
I have a tree with nodes taken up from a DB query, developed in ExtJs 3.4.0.
I need to append to every treenode three strings: "add", "del", "mod", and make them clickable to permorm different action.
"add" should add a child node to the clicked one.
"mod" should let the user modify the node, opening an appropriate UI.
"del" should delete the node and any child node.
Is there any way to perform described action using ExtJs 3.4.0?
Thank you.
Stefano
-
16 Oct 2012 12:27 AM #2
Hi Stefano,
Did you find a solution? I want to do approximatively the same thing.
Regards.
-
16 Oct 2012 12:58 AM #3
Unfortunately, I haven't.
I did with a context menu which opens at right click.
Not exactly what I intended to do, but it works as well.
-
16 Oct 2012 3:06 AM #4
I have just found something that could help :
To manipulate client side interface of tree nodes there is this :
where you can find interesting methods like: getEl() and getAnchor().Code:treenode.getUI()
And then you can add HTML to the node, for example:
I hope this helps.Code:Ext.DomHelper.append(tree.root.firstChild.firstChild.getUI().getAnchor(), '<p>hi</p>');



Reply With Quote