[Visual Basic] Private Function LoadTreeView( _
ByVal ds As DataSet, _
ByRef tree As TreeView _
) As Object
[Visual Basic] Private Function LoadTreeView(ByVal ds As DataSet, ByRef tree As TreeView)
Dim sroot As String = ""
Dim tchild As New TreeNode
Dim tchild1 As New TreeNode
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
If sroot <> ds.Tables(0).Rows(i).Item(1) Then
tchild = tree.Nodes.Add(ds.Tables(0).Rows(i).Item(1))
tchild.Tag = 0
sroot = ds.Tables(0).Rows(i).Item(1)
End If
tchild1 = tchild.Nodes.Add(ds.Tables(0).Rows(i).Item(2))
tchild1.Tag = ds.Tables(0).Rows(i).Item(0)
Next
End Function
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition