VB.NET datagridview 中的checkbox 用法

zhoukh012 2010-01-23 01:22:17


If Me.DataGridViewX1.CurrentCell.ColumnIndex = 0 Then
If checkBoxCell1.EditingCellFormattedValue = False Then

Else
If checkBoxCell2.EditingCellFormattedValue = False Then

Else
checkBoxCell2.EditingCellFormattedValue = True
End If
End If
End If

datagridview中有两列,都是checkbox类型的,checkBoxCell1 和checkBoxCell2
我想实现的是,当去掉checkBoxCell1的勾时,判断下checkBoxCell2是否勾上,如果是的话,把勾去掉

代码上面这么,没有能实现这样的结果,哪里错了,怎么改,望高手帮忙~
...全文
184 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenglidexiaoxue 2010-01-23
  • 打赏
  • 举报
回复
 If Me.DataGridViewX1.CurrentCell.ColumnIndex = 0 Then 
If checkBoxCell1.EditingCellFormattedValue = False Then

Else
If checkBoxCell2.EditingCellFormattedValue = False Then

Else
checkBoxCell2.EditingCellFormattedValue = false
End If
End If
End If

16,549

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧