I\'v got a combobox that I created as a user control(it\'s actually made up of a label, combobox and textbox). I\'m trying to bind a dataset to the combobox datasource, but
I think you have the property Modifiers of your combo to something different from Public.
However I will choose to implement two new public properties at the usercontrol level.
DisplayMember
and ValueMember
just to avoid that ugly cast.
In the set/get accessor I will reflect the values in/from the internal combo
public string DisplayMember
{
get { return combobox1.DisplayMember; }
set { combobox1.DisplayMember = value;}
}
public string ValueMember
{
get { return combobox1.ValueMember; }
set { combobox1.ValueMember = value;}
}