|
|
 |
| C# 2005 For discussion of Visual C# 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# 2005 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

July 14th, 2006, 02:57 AM
|
|
Authorized User
|
|
Join Date: Jul 2006
Location: Schiedam, zuid holland, Netherlands.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to select a node or text from treeview
Hi there
I am new to programming C# and programming in general so I am hoping you guys can help me.
I have to make a routine that connects a different data source to a data grid view using a treeview.
So I have to make a program with several if statements that selects a node or text. If a node with text “hello” is selected the data source should be X.
I hope my problem is clear en hope you can help me.
Greetings,
MacDevv
|

September 4th, 2006, 01:17 PM
|
|
Authorized User
|
|
Join Date: Sep 2006
Location: , , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As_
System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
Label1.Text = "You are here->" & " " & e.Node.FullPath
'displaying the path of the selected node
Label2.Text = "Current node selected:" & " " & e.Node.Text
'displaying the selected node
End Sub
u can try this code.And Let me know if it works
|

September 4th, 2006, 01:18 PM
|
|
Authorized User
|
|
Join Date: Sep 2006
Location: , , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
this code is in VB.Net.But U cand easily change it for c#
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |