Hello,
I have created a UltraWebTree (2008 V3) that is bound to a datasource. I would like the parent item to be editable, but the leaf not editable.
Right now, I'm capturing the AfterNodeUpdate() client side event to change the leaf back to what I saved on the NodeClick() client side event.
While that prevents the user from changing a group item's name, it would be nice to be able to not have the edit box activate in the first place; while still letting them change the group name.
Is there a way to control which node items are editable on the server, when it's being bound to the datasource?
Thanks.
Thanks for the reply.
function BeforeBeginNodeEdit(treeId, nodeId) { if (igtree_getNodeById(nodeId).getLevel() > 0) return true; else return false; }
gives me the results I want: to allow the user to change the text of the first level of the tree, but ignore any double-clicking they may do to the other levels.
Not sure if this will totally help you or not, as I needed to turn off edit capability for all nodes, but I did so with the following client side snippet:
// turn off edit capability of tree function igtree_beginedit(tn,nodeId) { //custom logic here return false; }
Perhaps you can tweak to only call this on the nodes you need to "turn off".
Good luck,
Dan