'用递归函数生成 目录树(目录带序号) Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1") Dim nd As WinForm.TreeNode Dim dt As DataTable = DataTables("表A") tr.StopRedraw() tr.Nodes.Clear tr.Nodes.Add("全部") For Each dr As DataRow In dt.Select("第二列 is not null") If dr.IsNull("第一列") Then nd = tr.Nodes.Add(dr("第二列"),dr("第二列") & dr("第三列")) Functions.Execute("AddChildren",nd,dt) End If Next
|