Hello
I would like to be able to change the text before editing it on the client side
the text of my node is
mynodeText (0)
when I double click now, I get "mynodeText (0)" in the textbox
I would like to get "mynodeText" only.
I saw the js function which is called on node edit ...
first problem ...
function uwTree_BeforeBeginNodeEdit(treeId, nodeId){ igtree_getNodeById(nodeId).getTag();
igtree_getNodeById(nodeId).getText(); }
why igtree_getNodeById(nodeId).getTag(); works
and igtree_getNodeById(nodeId).getText(); generate en error in your getText function ... parentNode error ?
Second , How can I set the textbox with the text I want , here "mynodeText"
Thx in advance
GillouX
The first problem is solved
function uwTree_BeforeEndNodeEdit(treeId, nodeId, newValue){ //Add code to handle your event here. alert(igtree_getNodeById(nodeId).getText()); }
getText works correcty in the BeforeEndNodeEdit
When a node is in edit mode, IG UltraWebTree creates a global igtree_editControl object and you can use it's value property to set arbitrary value. For example
<ignav:UltraWebTree ID="UltraWebTree1" runat="server" Editable="True"> <ClientSideEvents BeforeBeginNodeEdit="beforeNodeEdit"/> </ignav:UltraWebTree> <script language="javascript"> function beforeNodeEdit(treeId, nodeId) { igtree_editControl.value = "sone value"; } </script>
Hope this helps.
Cool
Thx
thx for the answer ;)
Maybe we need to add this information to our documentation as well, I will do my best to help improve docs/samples for the next release.
Thanks for reporting this.