Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / February 2007

Tip: Looking for answers? Try searching our database.

DataGridViewCheckBoxColumn null/default value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
juhimg@gmail.com - 10 Feb 2007 06:28 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.