Interne Relation aufbauen und Tree aufbauen
[Visual Basic] Private Sub Load_Treeview( _
ByVal oSourceData As DataSet, _
ByRef tree As TreeView _
)
[Visual Basic] Private Sub Load_Treeview(ByVal oSourceData As DataSet, ByRef tree As TreeView)
If Not (oSourceData Is Nothing) Then
Dim oView As DataView = oSourceData.Tables(0).DefaultView
Dim oTable As DataTable = oView.Table
Dim oDS As DataSet = New DataSet()
oDS.Tables.Add(oTable.Copy())
If oDS.Relations.Contains("SelfRefenceRelation") = False Then
oDS.Relations.Add("SelfRefenceRelation", _
oDS.Tables(0).Columns("Servicekatalognr"), _
oDS.Tables(0).Columns("Parentid"))
End If
oTable.Dispose()
oTable = Nothing
LoadTreeView(oDS, tree)
oDS.Dispose()
oDS = Nothing
End If
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