Home Forums WinForms controls Xceed Grid for WinForms problem with GridCheckBox Reply To: problem with GridCheckBox

User (Old forums)
Member
Post count: 23064

Hi Tommy,

I’m still having an issue with the value of the control in the cell:

I changed the code to:
<code>
if (myRow.Cells[“CONTROL”].Value != DBNull.Value)
{
if (myRow.Cells[“CONTROL”].Value.ToString() == “True”)
{
strControl = “T”;
}
else
{
strControl = “F”;
}
}
</code>

and it passes through to the 2nd if statement but when it tries to retrieve .Value.ToString(), i get object reference not set…and in the watch window

myRow.Cells[“CONTROL”].Value = <undefined value>

I’m missing something. If I select the checkbox it is passing True, but if I don’t click it I’m not getting false or null, but rather <undefined value>.

Do you have any idea why this would be happening?

Thanks again

Imported from legacy forums. Posted by Nathan (had 418 views)