dataset中有两个table(t1和t2)
t1: id name id1
t2: id1 name
要使combobox在下拉列表中的值为t2.name,当改变combobox中选中的值时更新t1中id1的值.
请问通过数据绑定能实现吗?
t1: id name id1
t2: id1 name
要使combobox在下拉列表中的值为t2.name,当改变combobox中选中的值时更新t1中id1的值.
请问通过数据绑定能实现吗?
this.cb_xb.DataSource = ds.Tables["t2"].DefaultView;
this.cb_xb.DisplayMember = "name";
this.cb_xb.ValueMember = "id1";然后再写一个combobox的事件
http://blog.csdn.net/knight94/archive/2006/04/02/648172.aspx