How do I reference the value of a checkbox in a datagridview?
In the datagridview edit column window, I set the "FalseValue" and "TrueValue" to "False" and "True" respectively.
Then I try to access them using this:
If Me.TDataGridView.Item(Column, Row).Value = "False" Then
~~~
End If
But here's the error message I get:
Operator '=' is not defined for type 'DBNull' and string "True ".
I don't understand. If I set the underlying value of FalseValue to "False" shouldn't the value of an unchecked checkbox = "False" then? Or am I referencing the wrong cell attribute?
In the datagridview edit column window, I set the "FalseValue" and "TrueValue" to "False" and "True" respectively.
Then I try to access them using this:
If Me.TDataGridView.Item(Column, Row).Value = "False" Then
~~~
End If
But here's the error message I get:
Operator '=' is not defined for type 'DBNull' and string "True ".
I don't understand. If I set the underlying value of FalseValue to "False" shouldn't the value of an unchecked checkbox = "False" then? Or am I referencing the wrong cell attribute?