MSDN
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfsystemwindowsformscontrolclassdatabindingstopic.htmlistbox.DataBindings.Add(new
Binding("Value", ds, "customers.CustToOrders.OrderDate"));
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfsystemwindowsformscontrolclassdatabindingstopic.htmlistbox.DataBindings.Add(new
Binding("Value", ds, "customers.CustToOrders.OrderDate"));
报错:Additional information: This would cause two bindings in the collection to bind to the same property.
C#里的listbox好象本身就不支持绑定两个。
DataSet ds=new DataSet();
daa.Fill(ds,"abc");
this.listBox1.DataSource=ds.Tables["abc"];
this.listBox1.DisplayMember="ProductName";
this.textBox1.DataBindings.Add("Text",ds.Tables["abc"],"UnitPrice");