When you save a data in the combo box, and in this combo box you have two options (gasoline, diesel, alcohol, natural gas)
Selecting diesel and saved works normally.
The problem is when I want to load the combo box save always the first value of the combo appears, ie the gas.
How do I do when the user loads the information he can see in the combo box the value selected by him?
The code is below
public frmCadVeiculo2()
{
InitializeComponent();
List<Combustivel> itens = new List<Combustivel>();
itens.Add(new Combustivel() { IDCombustivel = "Ga", Nome = "Gasolina" });
itens.Add(new Combustivel() { IDCombustivel = "Di", Nome = "Diesel" });
itens.Add(new Combustivel() { IDCombustivel = "Al", Nome = "Álcool" });
itens.Add(new Combustivel() { IDCombustivel = "GN", Nome = "Gás Natural" });
cbTipoCombustivel.DataSource = itens;
cbTipoCombustivel.ValueMember = "IDCombustivel";
cbTipoCombustivel.DisplayMember = "Nome";
}