public class X { public DataTable dt; public BindingList<Test> y; } public class Test {public string Name;} BindingSource bs = new BindingSource(); bs.DataSource = AnInstanceOfX; cbo1.DataSource = bs; cbo1.DataMember = "y.Name" cbo2.DataSource= bs; cbo2.DataMember = "dt.Name" // Name is a columnThe first binding works, the second does not. Why?
cbo2.DataSource = AnInstanceOfX;
cbo2.DataMember = "dt.Name";
(P.S. this isn't actual code - just a simplified version of the problem)