VB.NET DataGridViewCheckBoxCell Checked值返回'Nothing' [英] VB.NET DataGridViewCheckBoxCell Checked value returns 'Nothing'
本文介绍了VB.NET DataGridViewCheckBoxCell Checked值返回'Nothing'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从DataGridViewCheckBoxCell获取值
i尝试了各种代码
DataGridView1。项目( 1 ,i).Value = False 然后
还
DataGridView1.rows(i).cells( 1 )。Value = False 然后
也使用
ctype
和
cbool
和
转换。 boolean
...
当我得到进入调试,当我将鼠标光标移动到.value上时,它返回Nothing
有必要获得它不会返回的正确布尔值。我是否必须更改ch的任何设置eckboxcell在设计时?
解决方案
这取决于你的复选框在复选框字段或模板字段中的天气。此页面包含更多信息。
http://forums.asp.net/t/1023839。 ASPX
I want to get the value from a DataGridViewCheckBoxCell
i have tried various codes
DataGridView1.Item(1, i).Value = False Then
also
DataGridView1.rows(i).cells(1).Value = False Then
also using
ctype
and
cbool
and
convert.boolean
...
When i got into debug, when i move the mouse cursor over the .value, it returns "Nothing"
it is necessary to get the proper boolean value which it wont return... do i have to change any settings of the checkboxcell at designtime?
解决方案
It depends on weather your checkbox is in a checkboxfield or a template field. This page has more info.
http://forums.asp.net/t/1023839.aspx
这篇关于VB.NET DataGridViewCheckBoxCell Checked值返回'Nothing'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文