Solved

checkbox in a datagrid

Posted on 2004-10-15
6
159 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
Technology Partners: 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!

 
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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