Hi!
I want to add a double click behavior for the tree. Since there is no such event, i was hoping to use the node edit functionality. Is there somway to stop the edit box from appearing by handling the before begin update event of the the tree.
Or if someone has a better idea please let me know.
Ahmad
I was going through the js file and found another function
function igtree_dblclick(evnt,tn)
This way edit and dblclick can work along side. But now i have another problem. On double click the selected node property of the tree doesnot change. As a result when i post back to the server i get the previously selected node. Looking through the code to set this straight. Any ideas?
Thanks,
This works fine. One question though. Is there any way to keep the node edit funcitonality as well.
I also tried to figure out a way to cancel the event, unfortunately without success - it seems that NodeEdit cannot be cancelled. I found a way to deal with this problem though - hopefully it will work fine for you. The idea is to override the igtree_beginedit javascript method UltraWebTree is using for its editing logic - since you are not going to need it anyway - just place your javascript code there. It will act sort of an double click event handler. (just make sure you have placed the definition after your UltraWebTree declaration).
Example:
<ignav:UltraWebTree ID="UltraWebTree1" runat="server" Editable="true"> <Nodes> ... </Nodes> </ignav:UltraWebTree> <script language="javascript"> function igtree_beginedit(tn,nodeId) { var node = igtree_getNodeById(nodeId); //custom logic here } </script>