Child-Nodes hinzufügen
[Visual Basic] Private Sub RecursivelyLoadTree( _
ByVal oDataRow As DataRow, _
ByRef oNode As TreeNode _
)
[Visual Basic] Private Sub RecursivelyLoadTree(ByVal oDataRow As DataRow, ByRef oNode As TreeNode)
Dim oChildRow As DataRow
For Each oChildRow In oDataRow.GetChildRows("SelfRefenceRelation")
Dim oChildNode As New TreeNode()
oChildNode.Text = oChildRow("Bezeichnung").ToString()
oChildNode.Tag = oChildRow("applikationsnr").ToString()
If oChildRow.Item("Aktiv") = False Then
oChildNode.ImageIndex = 2
oChildNode.SelectedImageIndex = 2
oChildNode.StateImageIndex = 2
If oChildRow.Item("Lic") = True Then
oChildNode.ImageIndex = 4
oChildNode.SelectedImageIndex = 4
oChildNode.StateImageIndex = 4
End If
Else
oChildNode.ImageIndex = 1
oChildNode.SelectedImageIndex = 1
oChildNode.StateImageIndex = 1
If oChildRow.Item("Lic") = True Then
oChildNode.ImageIndex = 3
oChildNode.SelectedImageIndex = 3
oChildNode.StateImageIndex = 3
End If
End If
oNode.Nodes.Add(oChildNode)
RecursivelyLoadTree(oChildRow, oChildNode)
Next oChildRow
End Sub
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