|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGridViewCheckBoxColumn null/default valueHi,
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. 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. On Feb 11, 1:23 am, "ClayB" <c***@syncfusion.com> wrote: The DataGridView is bound to a datasource. But I'm having a problem> 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. 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 |
|||||||||||||||||||||||