问题描述
您好,我是新听到的,可以提供一些帮助.我没有设法在任何地方找到此信息,并偶然发现了这个社区,那里似乎有一些非常有帮助的成员!
我有一个应用程序,其中有一个用数据库中的数据填充的comboBox,我需要选择然后用适当的数据填充另一个comboBox,例如:
comboBox 1具有多种食品类型,例如罐装,新鲜,肉类
如果用户选择罐头食品,则comboBox 2将填充数据库中包含的所有罐头食品.
我希望我已经解释得足够好了!我非常感谢您的帮助,因为我为此付出了几天的努力!
预先感谢,
Dan
Hi, Im new hear and could do with a bit of help. I have not managed to find this info anywhere and stumbled accross this community which seems to have some very helpful memebers!
I have an application with a comboBox populated with data from a database, I need the selection to then populate another comboBox with the appropriate data for example:
comboBox 1 has a number of food types i.e. Tinned, Fresh, Meat
if a user selected Tinned, comboBox 2 would be populated with all the tinned food contained within the database.
I hope i''ve explained that well enough! I appreciate any help immensly as I have been struggling with this for a few days now!
Thanks in advance,
Dan
推荐答案
select column_name from tablename where index_comuln=''"+combobox1.text+"''"
然后将结果绑定到combobox2.
P.S 请勿复制粘贴此查询.这将不起作用
and then bound the result to combobox2.
P.S Do not copy paste this query. This will not work
这篇关于将comboBox的结果传递给另一个comboBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!