Hi Bill,
To set the checkbox value in DataGridView programatically, you can set the
value of that cell directly. For example, you need to set the checkbox
Checked in row 3 col 2, you can use
this.dataGridView1.Rows[3].Cells[2].Value = true;
As far as I know, we cannot set the default value for the column in the
DataGridView if it is not unbound. Have to set the value for that column in
each row added with a line of code like above.
HTH.
Kevin Yu

Signature
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Bill - 20 Dec 2005 03:58 GMT
Thank so much. It works.
-- Bill.
> Hi Bill,
>
[quoted text clipped - 14 lines]
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
Kevin Yu [MSFT] - 20 Dec 2005 08:44 GMT
You're welcome.
Kevin Yu

Signature
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Ejay - 21 Feb 2006 20:34 GMT
i think that's only for web form... how bout how to set the checkbox in a
winform? i cant seem to set the state to be a checked checkbox.. pls help thnx
> Hi Bill,
>
[quoted text clipped - 14 lines]
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
Gene Valgene - 18 Mar 2008 05:48 GMT
i'm having teh same issue :( anyone know what might be happening? i'm
setting the value of the cell as with the webform example above, but in
winform, doesn't seem to work. i can set the value, and retrieve it, but the
GUI doesn't reflect the changes. i believe my TrueValue and FalseValue are
set up correctly as well...anyone know what i may be missing?
Thanks!
> i think that's only for web form... how bout how to set the checkbox in a
> winform? i cant seem to set the state to be a checked checkbox.. pls help thnx
[quoted text clipped - 17 lines]
> > "This posting is provided "AS IS" with no warranties, and confers no
> > rights."