找回密码
 立即注册

QQ登录

只需一步,快速开始

junlingzhu2002

银牌会员

38

主题

150

帖子

3344

积分

银牌会员

积分
3344

活字格认证

junlingzhu2002
银牌会员   /  发表于:2011-10-12 10:43  /   查看:5688  /  回复:7
所选择的行中存在CheckBoxCell
我用下的方法对选中行的数据的存在进行判断
For cellIndex As Integer = 0 To MyGcMultiRow1.Template.Row.Cells.Count - 1
                If MyGcMultiRow1.GetValue(Row, cellIndex) IsNot Nothing Then
                    blnDataSonZaiFlg = True
                    Exit For
                Else
                    blnDataSonZaiFlg = False
                End If
Next
但是我不需要判断这个CheckBoxCell,请问如何剔除对CheckBoxCell得值的判断

7 个回复

倒序浏览
robert
金牌服务用户   /  发表于:2011-10-12 11:13:00
沙发
For cellIndex As Integer = 0 To MyGcMultiRow1.Template.Row.Cells.Count - 1
                If e.CellName = "checkBoxCell1" Then
                    Continue For
                End If
                If MyGcMultiRow1.GetValue(Row, cellIndex) IsNot Nothing Then
                    blnDataSonZaiFlg = True
                    Exit For
                Else
                    blnDataSonZaiFlg = False
                End If
Next
回复 使用道具 举报
junlingzhu2002
银牌会员   /  发表于:2011-10-12 11:21:00
板凳
e.CellName 的e是什么呀
我是用的下面的程序,如果用这个实现不了,你帮我改一下
Private Function Data_Chk(ByVal Row As Integer) As Boolean
        'チェックOKフラグ
        Dim blnDataSonZaiFlg As Boolean
        Try
            For cellIndex As Integer = 0 To MyGcMultiRow1.Template.Row.Cells.Count - 1
                If MyGcMultiRow1.Controls.CellName = "checkBoxCell1" Then
                    Continue For
                End If

                If MyGcMultiRow1.GetValue(Row, cellIndex) IsNot Nothing Then
                    blnDataSonZaiFlg = True
                    Exit For
                Else
                    blnDataSonZaiFlg = False
                End If
            Next
        Catch ex As Exception
        End Try
        Return blnDataSonZaiFlg
    End Function
回复 使用道具 举报
junlingzhu2002
银牌会员   /  发表于:2011-10-12 12:21:00
地板
急急急,麻烦你可以先帮我看一下吗,
回复 使用道具 举报
robert
金牌服务用户   /  发表于:2011-10-12 12:29:00
5#
If MyGcMultiRow1.Controls.CellName = "checkBoxCell1" Then
                    Continue For
                End If

改成
                If MyGcMultiRow1(Row, cellIndex).CellName = "checkBoxCell1" Then
                    Continue For
                End If
回复 使用道具 举报
robert
金牌服务用户   /  发表于:2011-10-12 12:30:00
6#
其中"checkBoxCell1"是你的checkBoxCell的名字,如果是别的名字,改过来就可以
回复 使用道具 举报
junlingzhu2002
银牌会员   /  发表于:2011-10-12 12:40:00
7#
成功解决
不过是用
MyGcMultiRow1(Row, cellIndex).Name= "checkBoxCell1"
哈哈
回复 使用道具 举报
robert
金牌服务用户   /  发表于:2011-10-12 13:35:00
8#
解决就好
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部