以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]甜版,如何用GetCheckedRows实现勾选行  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=129262)

--  作者:爱好所有
--  发布时间:2018/12/25 14:32:00
--  [求助]甜版,如何用GetCheckedRows实现勾选行
甜版,如何用GetCheckedRows实现勾选行,如果选中的行中第一列的有相同值,且大于8行了提示大于8条,就不能再勾选 了。怎么实现呢?谢谢!
--  作者:有点甜
--  发布时间:2018/12/25 14:40:00
--  

参考 BeforeCheckRow 事件

 

If e.Row.Checked = False Then
    Dim count As Integer = 0
    Dim same As Boolean = False
    Dim pr As Row = Nothing
    For Each r As Row In e.Table.GetCheckedRows
        count+=1
        If pr IsNot Nothing Then
            If pr("第一列") = r("第一列") Then
                same = True
            End If
        End If
        pr = r
    Next
    If count >= 8 AndAlso same Then
        msgbox("不能勾选了")
        e.cancel = True
    End If
End If


--  作者:爱好所有
--  发布时间:2018/12/25 15:18:00
--  
谢谢