Foxtable(狐表)用户栏目专家坐堂 → 分别显示


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

主题:分别显示

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


加好友 发短信
等级:狐神 帖子:4752 积分:34568 威望:0 精华:0 注册:2008/8/31 22:44:00
  发帖心情 Post By:2014/5/10 23:16:00 [显示全部帖子]

试试DataColChanged事件

If e.DataCol.Name = "第一列"
    Dim c0 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox10")
    Dim c1 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox11")
    Dim c2 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox2")
    Dim c3 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox9")
    Dim s As String = "1-1/1-2/1-3/1-4,2-1/2-2/2-3/2-4,今天/明天/后天/以后"
    If e.DataRow.IsNull("第一列") = False
        Dim i As Integer = "ABC".IndexOf(e.DataRow("第一列"))
        If i >= 0
            c0.Text = s.Split(",")(i).Split("/")(0)
            c1.Text = s.Split(",")(i).Split("/")(1)
            c2.Text = s.Split(",")(i).Split("/")(2)
            c3.Text = s.Split(",")(i).Split("/")(3)
        End If
    End If
End If

 回到顶部
帅哥哟,离线,有人找我吗?
y2287958
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐神 帖子:4752 积分:34568 威望:0 精华:0 注册:2008/8/31 22:44:00
  发帖心情 Post By:2014/5/11 11:35:00 [显示全部帖子]

CurrentChanged事件:
If e.Table.Current Is Nothing Then '如果Current为Nothing
    Return '则返回
End If
Dim c0 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox10")
Dim c1 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox11")
Dim c2 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox2")
Dim c3 As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox9")
Dim s As String = "1-1/1-2/1-3/1-4,2-1/2-2/2-3/2-4,今天/明天/后天/以后"
If e.Table.Current.IsNull("第一列") = False
    Dim i As Integer = "ABC".IndexOf(e.Table.Current("第一列"))
    If i >= 0
        c0.Text = s.Split(",")(i).Split("/")(0)
        c1.Text = s.Split(",")(i).Split("/")(1)
        c2.Text = s.Split(",")(i).Split("/")(2)
        c3.Text = s.Split(",")(i).Split("/")(3)
    Else
        c0.Text = Nothing
        c1.Text = Nothing
        c2.Text = Nothing
        c3.Text = Nothing
    End If
Else
    c0.Text = Nothing
    c1.Text = Nothing
    c2.Text = Nothing
    c3.Text = Nothing    
End If


 回到顶部