Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding Checkbox to nchar column
Message
 
 
À
26/01/2010 13:16:42
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01445996
Message ID:
01446014
Vues:
23
I am trying to find an excuse for my stupidity but at the moment can't come up with a good one. Give some time to think about it <g>. Thank you.

>Dmitry,
>
>>>>1. I have noticed that both of your checkbox classes (BBCheckBoxString and BBCheckBox) are designed to be bound to a string column. Do I understand that I would need to create another class - e.g. XXCheckBoxBit - to bind a checkbox to a bit type column?
>>>
>>>No, the second one (BBCheckBox) is your typical CheckBox, designed to be bound to a boolean value (bit in the database), which most of the time you want to do. I'm not sure what gave you the impression it was for a string datatype.
>>>
>>
>>Why then the code in the DataBind of the second class has "string column"?
>
>That's the column name in the DataTable that you're binding to! You'd use the DataBind method like this:
>
>
>this.MyCheckBox.DataBind(MyTable, "MyBoolColumn");
>
>
>~~Bonnie
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform