Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple data binding to a property
Message
From
14/09/2003 21:00:08
 
 
To
13/09/2003 11:39:13
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00828163
Message ID:
00828878
Views:
38
>>It sounds like you've figured it out ok ... even the ComboBox will bind just fine to a property, as long as you're binding to an actual property and not a public field ... I don't know what your problem was though with your ComboBox example ... the stuff I just played with worked fine even if I didn't instantiate the field.

Wow! Where are you doing the binding? I'm doing it in the Form_Load(). I still can't get mine to work.

Also, I'm not sure what you meant by not instantiating the property...did you mean "initializing" the property?

Ooh! Ooh! Hold da fone!!

My question above got me wondering, and while I was successfully binding the TextBoxes in the Form_Load(), I couldn't do the same with the ComboBox. If I moved the line of code to bind the Combo to the form property to the CON-STRUCT-OR (after the InitializeComponent() call), it worked !!

Interesting that while I had to do the Combo binding in the constructor, I could bind a textbox to the same property in the Form_Load, so that when selecting a different value in the combo, it's SelectedValue shows up in the TextBox.

This really seems strange as the constructor fires before the Load(), and begs the question as to why it would have a problem binding in the Load() but not the constructor...
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform