need information on vb.net treeview control

tutu

Member
Joined
Apr 17, 2006
Messages
12
Location
india
Programming Experience
1-3
hi all,
please give me codes on how to populate the tree view control in vb.net using sql server as the backend
 
Use Toolbox

For this use Toolbox. Just drag the Treeview control to the form and write the code for addding,deleting or updating the query


To add or remove nodes in the designer
  1. Select the TreeView control or add one to the form.
  2. In the Properties window, click the ellipsis (
    vbellipsesbutton.gif
    ) button next to the Nodes property. The TreeNode Editor appears.
  3. To add nodes, a root node must exist; if one does not exist, you must first add a root by clicking the Add Root button. You can then add child nodes by selecting the root or any other node and clicking the Add Child button. To delete nodes, select the node to delete and then click the Delete button.
To add nodes programmatically
  • Use the Add method of the tree view's Nodes property. ' Visual Basic' Adds new node as a child node of the currently selected node.Dim newNode As TreeNode = New TreeNode("Text for new node")TreeView1.SelectedNode.Nodes.Add(newNode
For more refer MSDN help
 
Back
Top