可以,你根据所属地区和客户代码两列生成目录树,然后遍历节点,逐个节点设置节点标题即可。 http://www.foxtable.com/help/topics/2302.htm
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") tv.BuildTree("订单", "产品|客户|雇员") For Each nd As WinForm.TreeNode In trv.AllNodes if nd.Level = 1 Then dim ps() As string = nd.Fullpath.split("\") dim dr as datarow = DataTables("数据表").find("所属地区 ='" & ps(0) & "' and 客户代码 = '" & ps(1) & "'") if dr isot nothing then nd.text = nd.text & " " & dr("客户名称") end if end If Next
|