Welcome Guest Search | Active Topics | Sign In | Register

AllowEdit and ItemClick conflict Options
Glenn Dardick
Posted: Saturday, November 13, 2010 3:43:10 PM
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.
Glenn Dardick
Posted: Saturday, November 13, 2010 7:20:07 PM
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.
eo_support
Posted: Sunday, November 14, 2010 7:32:34 AM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.