以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  下拉框采用行数据作为下拉值  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=96081)

--  作者:有点色
--  发布时间:2017/2/12 23:40:00
--  

 加一列,把所有专业的值,合并到一列表达式列去,然后参考

 

http://www.foxtable.com/webhelp/scr/1843.htm

 


--  作者:有点色
--  发布时间:2017/2/16 1:35:00
--  

参考代码

 

If e.IsFocusCell Then \'如果是焦点所在单元格
    If e.Col.Name = "专业类别" Then
        Dim ls As new List(Of String)
        For Each dr As DataRow In DataTables("员工证书档案").Select("[证书名称] = \'" & e.Row("证书名称") & "\'")
            For Each a As String In dr("注册专业").split(",")
                If ls.Contains(a) = False Then
                    ls.add(a)
                End If
            Next
        Next
        e.Col.ComboList = String.Join("|", ls.ToArray)
    End If
End If


--  作者:有点色
--  发布时间:2017/2/16 12:40:00
--  
    If e.Col.Name = "姓名" Then
        e.Col.ComboList = DataTables("员工证书").GetComboListString("姓名","[证书名称] = \'" & e.Row("证书名称") & "\' And [注册专业] like \'%" & e.Row("专业类别") & "%\'")
       
    End If