Foxtable(狐表)用户栏目专家坐堂 → 新手 请教目录树问题


  共有5564人关注过本帖树形打印复制链接

主题:新手 请教目录树问题

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251054 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/6/13 9:49:00 [显示全部帖子]

可以,你根据所属地区和客户代码两列生成目录树,然后遍历节点,逐个节点设置节点标题即可。
 
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


 回到顶部