Solved

checkbox in a datagrid

Posted on 2004-10-15
6
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 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