Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple data binding to a property
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00828163
Message ID:
00828879
Vues:
15
>This is how I use databindings in c# for Winforms
>
>this.Text1.DataBindings.Add(new Binding("Text",ds_clients,"clientdata.client_name"));

If ds_clients is a dataset, I'm not having a problem with that, Fred. My problem is in attempting to bind a control to an object property, and I think I've got it working for Combo's and TextBoxes:

Rule 1:

The property to which you are binding must be a public property, not a public field, not a protected or private property. This probably won't be an issue because the property will be a member of a business or UI services object and it'd have to be public anyway.

Rule 2:

For ComboBoxes, the binding must be done in the form's constructor. TextBoxes can be successfully bound in the Form_Load().
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform