This is how I use databindings in c# for Winforms
this.Text1.DataBindings.Add(new Binding("Text",ds_clients,"clientdata.client_name"));
>>Hi, Steve.
>>
>>You may find something here:
>>
www.bluevisionsoftware.com/WebSite/Books/CustomControlsAndDesigners/Samples/Chapter6.pdf>
>Hey, Claudio, thanks!
>
>This revealed something more. This article states that (for simple binding) you can only bind to a public property, not a field (public or otherwise). Armed with this, I was able to bind a textbox to a property. I'd previously made the properties private figuring that they were in scope of the code that was doing the binding, but considering that ).
>
>However, for some reason it won't work with a ComboBox:
>
>cboShippers.DataBindings.Add("SelectedValue",this,"CboValue");
>
>
>Where "CboValue" is a public (Int32) property on the form (the ValueMember of the combo is set to an Int32 column). This at least yields a different error, "Object reference not set to an instance of an object".
>
>So what's not an object? this? It most certainly is! CboValue? Well, no it isn't - is it s'posed to be? <s>
>
>Thanks again.
Fred Besterwitch, MCP
The harder you work. The luckier you get.