Bind List to comboBox in C#
Solution 1:
I found the problem. The problem is that I'm an idiot sometimes:
private void cargarCombo<T>(ComboBox combo, List<T> data, string displayMember, string valueMember)
{
BindingSource source = new BindingSource();
source.DataSource = data;
combo.DataSource = source.DataSource;
cmbEstadoAsistencia.DisplayMember = displayMember;
cmbEstadoAsistencia.ValueMember = valueMember;
}
cmbEstadoAsistencia should be change to combo
I was hardcoding the name of one of the comboBoxes. I'm sorry for posting garbage :(