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
Re: TreeView Problem [URGENT]
Isn't there an event 'onClick' instead of Afterselect ?
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.
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