Are you adding checkboxes to datagrid at runtime?
Dim chk As New DataGridViewCheckBoxCell
If condition Then
chk.Value = True
Else
chk.Value = False
End If
' Add checkbox control to datagrid
DataGridView1.Item(0, 0) = chk
If not, then
If condition Then
DataGridView1.Item(0, 0).Value = True
Else
DataGridView1.Item(0, 0).Value = False
End If
"object reference not set"-error comes from declaring an object
dim chk as checkbox but not creating the instance, like
dim chk as New checkbox
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Offline 1,024 posts
since Aug 2008