Vb.net 单个文本框上的多个数据绑定
我试图创建一种通过下拉选项在单个文本框中显示不同数据列的方法 就像我在一个上选择“first”,在第二个上选择“first”一样,文本框将绑定指定的列,这里是“first-first”的情况Vb.net 单个文本框上的多个数据绑定,vb.net,ms-access,Vb.net,Ms Access,我试图创建一种通过下拉选项在单个文本框中显示不同数据列的方法 就像我在一个上选择“first”,在第二个上选择“first”一样,文本框将绑定指定的列,这里是“first-first”的情况 Private子按钮1\u单击(发送方作为System.Object,e作为System.EventArgs)处理按钮1。单击 如果ComboBox2.Text=“First”,则 Textbox1.text=数据绑定-第一
Private子按钮1\u单击(发送方作为System.Object,e作为System.EventArgs)处理按钮1。单击
如果ComboBox2.Text=“First”,则
Textbox1.text=数据绑定-第一
我知道有一个属性选项,但每个文本框只有一个绑定。
有人知道我能做些什么来让它工作吗?还是不可能
我使用的是数据网格和绑定导航器,仅使用1个表,其中包含Visual Studion 10和Access 13作为数据库
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
If ComboBox2.Text = "First" Then
Textbox1.text = databindings - first first < Columns name
elseif combox2.text = "second" then
Textbox1.text = databindings - first second
End If
elseif combox1.text ="second" then
If ComboBox2.Text = "First" Then
Textbox1.text = databindings - second first
elseif combox2.text = "second" then
Textbox1.text = databindings - second second
End If
elseif combox1.text ="third" then
If ComboBox2.Text = "First" Then
Textbox1.text = databindings - third first
elseif combox2.text = "second" then
Textbox1.text = databindings - third second
End If
else
If ComboBox2.Text = "First" Then
Textbox1.text = databindings - fourth first
elseif combox2.text = "second" then
Textbox1.text = databindings - fourth second
End If
End If