Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tri-state checkboxes in a grid
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00767928
Message ID:
00768241
Vues:
30
Hi Kevin,

You need to set the propery called AllowNull to false in the DataGridBoolColumn to elimate the Tri-state of the checkbox.

Try calling the EndEdit method for the DataGrid to finish the editing.

>I have a datagrid that's bound to an ADO.NET data table.
>
>The table has two columns...a description and a boolean. The boolean column represents yes/no checkboxes. I also have an OK button on the form...when the user clicks OK, I scan through the datatable to see which rows the user 'checked'.
>
>The problem is that the tri-state nature of the checkbox [checked on, checked off, and the one in between where it's grey] is confusing to users. Also...if someone clicks a checkbox and then clicks OK, the update isn't truly 'made' to the datatable [it seems the edit is still pending in the grid].
>
>Has anyone else run into this? Any ideas to make this a little better?
>
>Thanks,
>Kevin
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform