Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I get rid of the third Checkbox state on a datagrid?
Message
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Titre:
How do I get rid of the third Checkbox state on a datagrid?
Divers
Thread ID:
00871007
Message ID:
00871007
Vues:
56
I have the following code for setting up one of the columns for a datagrid:
Dim OtherCorrespondenceCol As New DataGridBoolColumn
OtherCorrespondenceCol.MappingName = "OtherCorrespondence"
OtherCorrespondenceCol.HeaderText = "Other " & ControlChars.CrLf & "Correspondence"
OtherCorrespondenceCol.Width = 95
OtherCorrespondenceCol.AllowNull = False
OtherCorrespondenceCol.FalseValue = False
OtherCorrespondenceCol.TrueValue = True
gridStyle.GridColumnStyles.Add(OtherCorrespondenceCol)
The grid loads fine with existing information. However, when I click on the grid to add a new row, the default value for the checkbox is the greyed out state ("third state"). I want it to default to be not selected (False/0).

What am I missing to make it so the "third state" is not an option? Once I select the checkbox on datagrid, it never allows you to go back to the "third state". Once you have selected it, you can only alternate between checked and unchecked.

Thanks,

Vic
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform