I want to insert an object into comboBox in Win C#, I have 3 items in object.
This is my code
List<met>dyo = new List<met>();
dyo=DAL.metpa();
foreach(met t in dyo )
{
comboBox1.DataSource = d;
comboBox1.DisplayMember = t.last_Name;
comboBox1.ValueMember = t.id_Metp;
}
and I got this error:
Cannot bind to the new display member.Parameter name: newDisplayMember
What is the problem?
Try