i have created a simple user control with a combobox and put one instance of that user control in main form.
i have no problem with assigning it a data source, but i'm not receiving the SelectedItem or SelectedValue.
in user control i wrote -
public object ComboSelectedItem
{
get{return combobox.SelectedItem;}
set{combobox.SelectedItem=value;}
}
From main form i'm accessing the control with-
userControl1.ComboSelectedItem=2
but the combo box selected item not changing to 2
what is the problem? how can i change the value of the combobox?
thanks in advance.