Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 无法检查DataGridView中的CheckBoxCell_Vb.net - Fatal编程技术网

Vb.net 无法检查DataGridView中的CheckBoxCell

Vb.net 无法检查DataGridView中的CheckBoxCell,vb.net,Vb.net,我在DataGridView的列中定义了一个CheckBoxCell,其属性如下: 但问题是我似乎无法勾选该复选框。我可以点击它,但这个框永远不会被选中 我通过以下代码添加行: Dim row(3) As String row(1) = "foo" row(2) = "bar" DataGridViewCustom.Rows.Add(row) 行0是复选框所在的单元格。我尝试过使用row0=True和row0=False,但它仍然不允许我在运行时选中或取消选中该框 我已经设置了DataGri

我在DataGridView的列中定义了一个CheckBoxCell,其属性如下:

但问题是我似乎无法勾选该复选框。我可以点击它,但这个框永远不会被选中

我通过以下代码添加行:

Dim row(3) As String
row(1) = "foo"
row(2) = "bar"

DataGridViewCustom.Rows.Add(row)
行0是复选框所在的单元格。我尝试过使用row0=True和row0=False,但它仍然不允许我在运行时选中或取消选中该框

我已经设置了DataGridViewCustom.Enabled=True和DataGridViewCustom.ReadOnly=False——事实上,这些是永远不会更改的默认变量


这是怎么回事?

将只读更改为false,您将该列的只读设置为true