bug,暂时变通处理一下
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim cs As String() = "一级类别|二级类别|三级类别".split("|")
Dim os As String () = "类别编号,类别编号,类别编号".split(",")
Dim dt As DataTable = DataTables("类别")
Dim filter As String = "1=1"
For Each lvl1 As String In dt.GetValues(cs(0), filter & " and " & cs(0) & " Is not null", os(0))
Dim nd1 = trv.nodes.add(lvl1)
For Each lvl2 As String In dt.GetValues(cs(1), filter & " and " & cs(1) & " Is not null" & " And " & cs(0) & " = '" & lvl1 & "'", os(1))
Dim nd2 = nd1.nodes.add(lvl2)
For Each lvl3 As String In dt.GetValues(cs(2), filter & " and " & cs(2) & " Is not null" & " and " & cs(0) & " = '" & lvl1 & "' and " & cs(1) & " = '" & lvl2 & "'", os(2))
Dim nd3 = nd2.nodes.add(lvl3)
Next
Next
Next