Solved

checkbox in a datagrid

Posted on 2004-10-15
6
152 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now