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
|