paulofonsecajr
asked on
How to select a combobox item by value?
I have a combobox with datasource, display member and value member configured (retrieving by data table) and I want to update a data table row in a form. The combobox must be populated and the actual value need to be selected. I try to do it with this.combobox1.SelectValue = DataTableValue but the item not changed. Oh! I forgot to say a important question: I don´t want to use SelectedIndex. I want to select the item by value. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, the event was wrong, I was setting up the value before Form_Load and the combo fill.
Death259. The solution is ok.
Death259. The solution is ok.
Well, if this solved your problem please be sure to mark it as the answer.
ASKER
this.comboTabelaPorModeloD
and
this.comboTabelaPorModeloD
But it not works.