Hi,
I'm using a DataGridView with some checkboxes
(DataGridViewCheckBoxColumn). It seems that the check box is
initialized to null. I set the TrueValue, FalseValue, and
IndeterminateValue to the appropriate values (true/false). But I
haven't found any property that sets the null value to false. As a
result, I always get NULL if no action was done on the checkbox.
I need to do the following-
1. How can I make the NULL value of the DataGridViewCheckBoxColumn to
indicate false.
2. How can I set the default value of the checkbox - i.e. when the
grid is loaded with the checkbox, it should be checked.
Any pointers in this direction would really be appreciated!
Thanks,
Juhi.
ClayB - 11 Feb 2007 09:23 GMT
Is this DataGridView bound to a particular DataSource? If so, you
might try making sure the DataSource does not contain null values (or
DBNulls) in that column. For bound grids, the default behavior is to
just reflect what comes from the bound datasource.
===============
Clay Burch
Syncfusion, Inc.
juhimg@gmail.com - 12 Feb 2007 04:52 GMT
> Is this DataGridView bound to a particular DataSource? If so, you
> might try making sure the DataSource does not contain null values (or
[quoted text clipped - 4 lines]
> Clay Burch
> Syncfusion, Inc.
The DataGridView is bound to a datasource. But I'm having a problem
with new rows that are added to the grid. For every new row, the
checkbox is initialized to NULL and I don't know how to make NULL be
set to FALSE.
Any thoughts on this??
Thanks much in advance!
--Juhi