Results 1 to 4 of 4

Thread: TreeView Problem [URGENT]

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    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

  2. #2
    Member
    Join Date
    Mar 2005
    Posts
    43

    Re: TreeView Problem [URGENT]

    Isn't there an event 'onClick' instead of Afterselect ?

  3. #3

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    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.

  4. #4
    Junior Member
    Join Date
    Feb 2005
    Posts
    31

    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
  •  



Click Here to Expand Forum to Full Width