您的位置:首页 > 编程语言 > VB

[VB.NET]combobox数据绑定

2008-12-28 14:05 309 查看



<script type="text/javascript"><!--
google_ad_client = "pub-8333940862668978";
/* 728x90, 创建于 08-11-30 */
google_ad_slot = "4485230109";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

combobox数据绑定
我用两个comboBox,一张表。表里有名称和保护类型
,我想做到:点击combobox1下拉菜单中的某项,即名称。则在combobox2的下拉项中就会显示与combobox1中选的项相关的东西。即与上述名称相关的保护类型。

谢谢~~~~

如果有代码更好
__________________________________________________________________________
这种不就是根据combobox1选中的值作为条件差数据绑定到combobox2吗?
难吗?
我没代码~~
__________________________________________________________________________
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
这里根据ComboBox1.SelectedText or ComboBox1.SelectedValue再去做查询绑定ComboBox2的内容
End Sub
__________________________________________________________________________
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vb.net