是否可以通过另一个组合框中选择的数据来选择组合框中显示的数据? [英] Is it possible to select what data is displayed in a combo box by the data selected in another combo box?

查看:75
本文介绍了是否可以通过另一个组合框中选择的数据来选择组合框中显示的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以指出我正确的方向吗?我找不到有关此主题的文档.我希望能够根据另一个组合框中选择的数据来更改组合框中的数据.例如,如果我在一个组合框中选择了GOLF CLUBS,则下一个组合框中将包含GOLF CLUBS的制造商.将GOLF CLUBS更改为CARS,下一个组合框将包含CARS的制造商.第一个.

研究主题:
在CComboBox中捕获用户选择 [使用WebMethods进行级联下拉常规下拉(由JQuery和JSON辅助)也.

希望这会有所帮助!


在c#中可能是

txtBox1.Text = txtBox2.SelectedText;



尝试是否也可以与c ++一起使用...


Can someone point me in the right direction? I can''t locate documentation on this subject. I want to be able to have the data in a combo box change depending on the data selected in another combo box.For example, if I select GOLF CLUBS in one combo box the next combo box will contain the MANUFACTURERS of GOLF CLUBS, if I change GOLF CLUBS to CARS the next combo box will contain the MANUFACTURERS of CARS.

解决方案

All you have to do is reload the dependent combobox every time the user selects something on the first.

Topics to research:
Load CComboBox Dynamically[^]
Capture user selection in CComboBox[^]

A couple of different approaches you can take on the dependent box:
- Leave it blank until user selects something.
- Fill in based on default choice for first.
- Don''t show it until user selects something from first.


You can use cascading dropdowns with WebMethods or normal dropdowns (aided by JQuery & JSON) also.

Hope this helps!


in c# its possible

txtBox1.Text = txtBox2.SelectedText;



try if it also work with c++...


这篇关于是否可以通过另一个组合框中选择的数据来选择组合框中显示的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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