• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

checkbox in a datagrid

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
genesisproject
Asked:
genesisproject
1 Solution
 
Hans LangerCommented:
checked that goes grey Mean Null Value.
0
 
Hans LangerCommented:
Just use
column.AllowNull = False
0
 
genesisprojectAuthor Commented:
i tried using column.AllowNull = false but when it is populated it somehow overrides the allowNull = false
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
JetPCCommented:
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
 
Hans LangerCommented:
you must set the property

column.FalseValue = "NO"
column.TrueValue = "YES"
0
 
LacutahCommented:
OK, actually, change the DataGrid.DataGridTableStyle(0).GridColumnStyles(Index of CheckBoxColumn).AllowNull = False
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now