Solved

checkbox in a datagrid

Posted on 2004-10-15
6
155 Views
Last Modified: 2010-04-23
I have checkboxes in a datagrid.  It works great but I don't understand that there are three types of clicks

a checked
a non checked
and a checked that goes grey

why does this happen

I just want checked and non checked
0
Comment
Question by:genesisproject
6 Comments
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12323698
checked that goes grey Mean Null Value.
0
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12323732
Just use
column.AllowNull = False
0
 

Author Comment

by:genesisproject
ID: 12324179
i tried using column.AllowNull = false but when it is populated it somehow overrides the allowNull = false
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 1

Expert Comment

by:JetPC
ID: 12324503
change your database so that the field has a constraint that says it is NOT NULL. when your data grid popultes, your field will take on the same property, or at least it should.  What type of database are you using, or how are you populating the data grid?
0
 
LVL 10

Expert Comment

by:Hans Langer
ID: 12324802
you must set the property

column.FalseValue = "NO"
column.TrueValue = "YES"
0
 
LVL 9

Accepted Solution

by:
Lacutah earned 500 total points
ID: 12325273
OK, actually, change the DataGrid.DataGridTableStyle(0).GridColumnStyles(Index of CheckBoxColumn).AllowNull = False
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question