Steve (and anyone else following this thread),
I apologize for spitting out answers without actually trying it. Usually I only reply to stuff I know or have already done, and when it's something I haven't done, I'll play with it first before I bother making a fool of myself with a bad answer. However, I was busy and so I didn't take the time to test things, so my answers were a bit vague, weren't they?
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. IOW:
private int m_Mine;
public int Mine
{
get {return m_Mine;}
set {this.m_Mine = value;}
}
this.MyCombo.DataBindings.Add("SelectedValue", this, "Mine");
Note that I never instantiate m_Mine, and yet it compiled fine and ran fine. So, you must've missed something somewhere. Try again? <s>
~~Bonnie
< snip >
>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.