|
-
May 11th, 2005, 02:09 AM
#1
Thread Starter
Frenzied Member
TreeView Problem [URGENT]
Hello everybody,
I have a treeview control and on click on different nodes, different forms open. I have written the code in AfterSelect event of treeview control. The problem is when I select a node, a form opens. I close the form. When I again click on the same node that was selected, the form doesn't open because the AfteSelect event does not fire. In order to open the same form, I have to click on some other node and then again click the previous to open the form.
Any ideas ??
Thanks
-
May 11th, 2005, 02:42 AM
#2
Member
Re: TreeView Problem [URGENT]
Isn't there an event 'onClick' instead of Afterselect ?
-
May 11th, 2005, 02:46 AM
#3
Thread Starter
Frenzied Member
Re: TreeView Problem [URGENT]
There is a click event for TreeView but there isn't a click event for Node. If I write code on TreeView click event, then event fires whenever the treeview is clicked event outside nodes, plus etc.
-
May 11th, 2005, 10:44 AM
#4
Junior Member
Re: TreeView Problem [URGENT]
A lazy way to do it would be to save the previously clicked node in a variable, and in the OnClick check if the selected node after clicking is equal to that variable. If the user selected another node it would return false, and of course if the user clicked something else it would deselect the node, once again making it false.
Dan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|