以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]两列满足条件按钮名改变 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=123367) |
||||
-- 作者:湛江智 -- 发布时间:2018/8/13 11:21:00 -- [求助]两列满足条件按钮名改变 列名值 1 2 3 且显隐逻辑列都为true 窗口里面的按钮才改名,求助
Select Case e.DataCol.Name Case "显隐","列名" Dim dr As DataRow = e.DataRow If dr("显隐") = True AndAlso dr("列名")= "1" Then \'如果要列名值等于 1 2 3 三行且显隐类都为true 按钮名称才变化呢? Forms("窗口1").Controls("CheckBox1").text = "yyy" Forms("窗口1").Controls("Button1").text = "ff" Else Forms("窗口1").Controls("CheckBox1").text = "aa" Forms("窗口1").Controls("Button1").text = "bb" End If End Select
[此贴子已经被作者于2018/8/13 11:31:25编辑过]
|
||||
-- 作者:有点甜 -- 发布时间:2018/8/13 12:04:00 -- Select Case e.DataCol.Name Case "显隐","列名" Dim dr As DataRow = e.DataRow Dim dr1 = e.DataTable.find("列名 = \'1\'") Dim dr2 = e.DataTable.find("列名 = \'2\'") Dim dr3 = e.DataTable.find("列名 = \'3\'") If dr1 IsNot Nothing AndAlso dr1("显隐") = True AndAlso dr2 IsNot Nothing AndAlso dr2("显隐") = True AndAlso dr3 IsNot Nothing AndAlso dr3("显隐") = True Then \'如果要列名值等于 1 2 3 三行且显隐类都为true 按钮名称才变化呢? Forms("窗口1").Controls("CheckBox1").text = "yyy" Forms("窗口1").Controls("Button1").text = "ff" Else Forms("窗口1").Controls("CheckBox1").text = "aa" Forms("窗口1").Controls("Button1").text = "bb" End If End Select |