From reading the docs, this should be possible, but I'm thinking that the DataSource needs to implement an interface that I'm missing.
I'd like to databind a control to a property. The property could be on a form or a business object class or a UI Services class of some kind. The following illustrates the problem.
If I drop two text boxes on a form, I can bind the Text properties:
this.txtBoxBound.DataBindings.Add("Text",this.txtBoxSource,"Text");
Then, any change in the value of the Text property of one, is reflected in the other.
So far, so good.
Now, I create a form field, txtvalue, and attempt to DataBind the textbox to that field:
string txtvalue = "";
.
.
.
this.txtBoxBound.DataBindings.Add("Text",this,"txtvalue");
Or, I create a public property, TxtValue that gets/sets this field, and attempt to bind to it:
this.txtBoxBound.DataBindings.Add("Text",this,"TxtValue");
In either case I get an exception, "Cannot bind to property or column TxtValue on DataSource"
What'm I doing wrong?
Thanks.
>>-Steve->>
Steve Sawyer
Geeks and Gurus, Inc.