请问一个treeview控件的问题
如何实现treeview控件易做图数据库呢?又如何实现treeview控件中单击节点能够使得在textbox控件中显示表中内容呢? --------------------编程问答-------------------- 'Private Sub FillTreeview(ByVal Nodetext As String)
' Dim Node As TreeNode
' Node = New TreeNode
' With Node
' .Name = Nodetext
' .Text = Nodetext
' .Tag = 1
' .ImageIndex = 0
' End With
' Me.TreeLeft.Nodes.Add(Node)
' FillTreeviewnode(2, 0, Nodetext)
'End Sub
'Private Sub FillTreeviewnode(ByVal ImageIndex As Integer, ByVal j As Integer, ByVal nodetext As String)
' If ActiveUser = "administrator" Then
' sqltxt = "select ProgrammName,FromName from tbl_System_ProgrammItem where ModeName='" & nodetext & "' group by ProgrammName,FromName"
' Else
' sqltxt = "select ProgrammName,FromName from tbl_System_ProgrammItem where ModeName='" & nodetext & "' and ProgrammID in (select ProgrammID from tbl_system_UserRight where userCode='" & ActiveUser & "') group by ProgrammName,FromName"
' End If
' Dim Node As TreeNode
' Dim i As Integer = 0
' Dim ds As New DataSet
' If mdlDataBase.CreateDataSet(ds, sqltxt) <> ExecuteSQLnum.ExecuteSuccess Then Exit Sub
' For i = 0 To ds.Tables(0).Rows.Count - 1
' Node = New TreeNode
' With Node
' .Name = ds.Tables(0).Rows(i).Item("FromName").ToString.Trim
' .Text = ds.Tables(0).Rows(i).Item("ProgrammName").ToString.Trim
' .Tag = 1
' .ImageIndex = 1
' End With
' Me.TreeLeft.Nodes(j).Nodes.Add(Node)
' Next
'End Sub
补充:.NET技术 , VB.NET