Initially I did it like this:
cboRuta.DataBindings.Add("SelectedValue", glRuta, "RutaId");
But it did not work. I'll try it the way you suggested and let you know.
>I have a quick question as to why you want to set the SelectedValue that way. Are you not binding this Combo to oCliente? If you do this, it should work without manually setting the SelectedValue:
>
>
>cboRuta.DataBindings.Add("SelectedValue", oCliente, "Ruta");
>
>
>~~Bonnie
>
>
>
>>Hi all, I have a generics list that I use to fill a combobox, I bound them like this:
>>
>>
>> cboRuta.DisplayMember = "Descripcion";
>> cboRuta.ValueMember = "RutaId";
>> cboRuta.DataSource = glRuta;
>>
>>
>>That part works fine, but if I set the selectedvalue property it doesn't seems to affect the displayed member of the combobox.
>>
>>
>> cboRuta.SelectedValue = oCliente.Ruta
>>
>>
>>What am I missing here?
>>
>>TIA, Enmanuel
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain