Newbie: Tree view help

Discussion in 'ASP .Net Web Controls' started by clsmith66, Nov 17, 2004.

  1. clsmith66

    clsmith66 Guest

    Is there a click event for the tree view control or does any one know how to
    create one?
     
    clsmith66, Nov 17, 2004
    #1
    1. Advertising

  2. Did you try to use the SelectedIndexChange of the treeview control?
    It has an argument: TreeViewSelectEventArgs which provides you with the
    index newnode being selected. (e.newNode returns the index of the selected
    node. You could use TreeView.GetNodeFromIndex(string index) to get a
    reference of the seelcted node).

    For example,
    create the SelectedIndexChange for the treeview and add the following code
    in it:
    TreeNonde tn = TreeView1.GetNodeFromIndex(e.NewNode)
    This line would return to you the node that was selected

    Regards
    Mohamed El Ashmawy
    MEA Developer Support Center
    ITWorx on behalf of Microsoft EMEA GTSC
     
    Mohamed El Ashmawy, Nov 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ex-Em-El

    tree view of table please help

    Ex-Em-El, Jul 8, 2004, in forum: XML
    Replies:
    1
    Views:
    465
    annoyingmouse2002
    Jul 9, 2004
  2. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,184
  3. raki
    Replies:
    1
    Views:
    1,169
    Alexey Smirnov
    Jun 24, 2009
  4. Parthiv Joshi
    Replies:
    1
    Views:
    758
    Samuel L Matzen
    Jul 6, 2004
  5. clsmith66

    Newbie: Trouble accessing all nodes in a tree view

    clsmith66, Oct 27, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    116
    clsmith66
    Oct 28, 2004
Loading...

Share This Page