是否可以通过另一个组合框中选择的数据来选择组合框中显示的数据? [英] Is it possible to select what data is displayed in a combo box by the data selected in another combo box?
问题描述
有人可以指出我正确的方向吗?我找不到有关此主题的文档.我希望能够根据另一个组合框中选择的数据来更改组合框中的数据.例如,如果我在一个组合框中选择了GOLF CLUBS,则下一个组合框中将包含GOLF CLUBS的制造商.将GOLF CLUBS更改为CARS,下一个组合框将包含CARS的制造商.第一个.
研究主题:
^ ]
^ ]
您可以在依赖框中使用几种不同的方法:
-将其保留为空白,直到用户选择某些内容.
-根据默认选择填写.
-在用户首先选择内容之前,不要显示它.
您可以使用常规下拉(由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屋!