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
Yes, I am currently esclating this feature request to PM and chances are we will have this in next release (depending on work-load / priorities).
I have suggested implementing a server-side NodeDoubleClick event + a couple of before / after client-side CSOM events for that + the functionality that the before event should ba cancellable.
If you have some suggestions/ideas on API / Implementation, please let me know. I will pass anything you suggest to PM as well.
Thanks a lot.
Yeah, i ended up doing this. :)
Cant infragisitcs provide a publically exposed event for double click in the future.
That's unfortunate, but could be expected since we are over-riding a lot of the internal functions of UltraWebTree (javascript is a wonderful language, you can do anything with it).
So, I guess, one possible solution is to use a hidden-field on the page, e.g.
<asp:HiddenField runat="server" ID="HiddenField1" />
and then set the value of the hidden to the, say, index or id or text or something unique that describes the node to be selected, e.g.
var hiddenField = document.getElementById("<%= HiddenField1.ClientID %>");
hiddenField.value = myNodeIntance.getText();
and then, back in the server-side, use the value in HiddenField instead of SelectedNode for the tree.
I tried using calling setSelectedNode, but the serverside SelectedNode property of the tree doesnot change.
Maybe calling explicitly the client-side (CSOM)
method to explicitly select the node needed will do the trick?