我如何...根据另一个组合框过滤组合框值? [英] How do I...Filter combobox values based on another combobox ?

查看:63
本文介绍了我如何...根据另一个组合框过滤组合框值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个使用数据源的组合框和数据网格视图,每个组合框显示DGV值。我想在第一个组合框中选择一个项目时,将一个过滤器与一个过滤器相关联。

ex:countrycombobox,customercombobox

从countrycombobox中选择一个国家时,customercombobox过滤器值和显示客户与所选国家/地区相关...

我正在寻找一段时间的完美代码,感谢先进的

I have two combobox and data gride view using data source , each combobox display DGV values . i want when selecting an item in the first combobox , seconed one filter the values's relates to first one .
ex: countrycombobox , customercombobox
when selecting a country from countrycombobox ,customercombobox filter values and display customers relates to selected country ...
i'm looking for a perfect code for a while , thanks for the replays in advanced

推荐答案

1. on selectedindexchanged invent of first combo box,load data from database where condition is selected value of combo box (i.e countrycombobox)
2. bind this data to second combo box (i.e customercombobox)


这篇关于我如何...根据另一个组合框过滤组合框值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆