Rank: Newbie Groups: Member
Joined: 11/11/2010 Posts: 8
|
I would like to allow editing of the names of the nodes within a tree. I've done this and it works.
I would like to update another control (in this case the Editor control) when a node is clicked. I've done this and it works via the ItemClick event.
My problem is when I double click on a node to update it, the ItemClick event gets triggered and runs - I see my node highlighted and ready for modification, but the serverside code resets the node and it is no longer able to be modified without double clicking again - which of course then invokes the ItemClick event, etc.
Is there a way I can have the ability to not have the ItemClick event get invoked if the node has already been selected.
Basically, I am trying to tie my treeview data to a separate database with additional info to display in a separate control.
|
Rank: Newbie Groups: Member
Joined: 11/11/2010 Posts: 8
|
I was able to work around the problem by providing a separate button and textbox to update the name in the node. I suppose I could have also used a context menu.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
There is no way to do in place edit and ItemClick at the same time because the first click always triggers ItemClick. In order to use node edit, you must disable ItemClick (by setting RaisesServerEvent to false). You can handle the TreeView's ClientSideOnItemClick and the perform any update with JavaScript.
You can not use ContextMenu either because there is no client side interface for you to put a node into edit mode.
Thanks!
|