Foxtable(狐表)用户栏目专家坐堂 → [求助]两表两列取值目录树


  共有2939人关注过本帖平板打印复制链接

主题:[求助]两表两列取值目录树

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/4/18 12:32:00 [只看该作者]

prepareEdit事件

 

static flag As Boolean = False

If e.Col.name = "地区" Then
    If e.IsFocusCell And flag = False Then
        Dim tb As New DropTreeBuilder
        tb.SourceTable = DataTables("表B") '指定目录树表
        tb.TreeCols = "地区" '指定用于生成目录树的列
        tb.ReceiveCols = "地区" '指定数据接收列
       
        Dim fdr As DataRow = DataTables("表B").find("国家='" & e.Row("国家") & "'")
        If fdr IsNot Nothing Then
            Dim dq As Integer = e.Table.DataTable.Compute("max(地区)", "国家='" & e.Row("国家") & "' and _Identify <> " & e.Row("_Identify"))
            tb.TreeFilter = "国家='" & e.Row("国家") & "' and 地区 > " & dq
        Else
            Dim dq As Integer = e.Table.DataTable.Compute("max(地区)", "国家='其他' and _Identify <> " & e.Row("_Identify"))
            tb.TreeFilter = "国家='其他' and 地区 > " & dq
        End If
        e.Col.DropTree = tb.Build()
        flag = True
    End If
Else
    flag = False
End If


 回到顶部
总数 23 1 2 3 下一页