locked
Assigning a node key RRS feed

  • Question

  • If nodes are created in a treeview in the "picture way of coding vb.net" i can assign a key to the node. I would like to do this by adding the key to the node in the code as i am using a query to  extract the key froma database and want to assign each key to each node as they are created.

    How can i do this?


    If you're not living on the edge, you're taking up too much room
    Tuesday, August 18, 2009 12:00 PM

Answers

  • Theres an overloaded Nodes.Add method that you can pass the key  as a parameter

    Treeview1.Nodes.Add (theKey, theValue)


    • Proposed as answer by Prasanta Swain Tuesday, August 18, 2009 12:41 PM
    • Marked as answer by Miller_a Tuesday, August 18, 2009 1:48 PM
    Tuesday, August 18, 2009 12:28 PM