473,382 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

TreeView Control in VB.NET 2005

Hello Friends,

I am migrating the code from VB 6.0 to VB.NET 2005.
I am not able to translate the following code .

In VB6.0 for treeview control to add the nodes to it , i have used
mytreeview.nodes.add(parent,TreeRelationshipConsta nts.tvwChild, , Text)
but in VB.NET i am unable to find the Equivalent code for TreeRelationshipConstants.tvwChild .
Please post the solution as soon as possible.

Thanks,
LATHA.
Jun 5 '08 #1
1 2562
shweta123
692 Expert 512MB
Hi,

You can try this code:

Expand|Select|Wrap|Line Numbers
  1.    'This is parent node variable
  2.         Dim pnode As New TreeNode
  3.         'This is child node variable
  4.         Dim cnode As New TreeNode
  5.  
  6.         pnode.Text = "Root"
  7.         cnode.Text = "Child"
  8.  
  9.         ''Add child node
  10.         pnode.Nodes.Add(cnode)
  11.  
  12.         ''Add parrent node
  13.         TreeView1.Nodes.Add(pnode)
Jun 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: serge calderara | last post by:
dear all, Is there an easy way to bind a treeview control with an XML object as datasource? In a similar way as the dataset is doing, and build columns accroding to XML node, I could imagine a...
7
by: (Pete Cresswell) | last post by:
I've got KeyDown coding and it fires when other keys are pressed, but when Enter is pressed, nothing. I'd like to support the (standard?) Windows behavior of executing DblClick processing when...
0
by: Laksh | last post by:
Hi, I'm using Treeview control that comes with VS 2005. In my page I have this control inside a <div> tag. Now this <div> is made visible when a client side button click event is fired. I want to...
7
by: nullref | last post by:
Hello, I am looking for recommendations for a TreeView component that can handle a large set of hierarchical items? Not huge, about 1,000 nodes or so. Any comments/suggestions? TIA. ...
4
by: Andrew Robinson | last post by:
I am using a TreeView to perform navigation and have a few nodes that need to generate a popup menu. For this, I use the SelectedNodeChanged event and then add the relevant "window.open" script to...
10
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a...
5
by: david | last post by:
I do not know if there is a treeView control for web form in .NET 1.1. I know there is IE Webcontrol package which has the treeview control for ..net 1.0. I have tested it in .net 1.1 before. It...
3
by: Jeff | last post by:
Hey ..NET 2.0 I'm trying to search a TreeView control for a specific TreeNode The code below doesn't work because it only searches the the top level of the nodes. I would like to program it...
7
by: Joe Cool | last post by:
Let's say I have a Treeview control on a form. Each leaf node in the Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and all ToolStripMenuItems Click event is handled by a comment...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.