What combobox property must be filled to make a choosen option reflect a correspondent code?
The code I used:
using (var connection = new MySqlConnection(connectionString))
var query = "SELECT SB_CR, DESCRICAO FROM cr WHERE TIPO=1";
using (var command = new MySqlCommand(query, connection))
using (var reader = command.ExecuteReader())
//Iterate through the rows and add it to the combobox's items
// It doesn't work
//comboBox1.ValueMember = reader.GetString("SB_CR");
So If I choose CASA a correspondent property containing the PK 101 must be available to be used by the program. What's the property ?
Thanks in advance!