How to use the selected value of combobox in other combo box?
Asked
Active
Viewed 44 times
2 Answers
1
Simple as this:
ComboBox2.SelectedValue = ComboBox1.SelectedValue;
Or you can store it in an Integer
variable and use it for whatever you need.

Raskayu
- 735
- 7
- 20
-
Hi. This is how it works. Let's say combobox2.text was disabled. When you selected a value on combobox1.text, combobox2.text will be enabled but there's only selected value on combobox1.text that can enabled combobox2.text. I don't get the codings for it. Thanks for the response – Georgiana Dec 02 '16 at 21:26
-
I don't get what are you're asking, so you wanna enable combobox2 when combobox1 have something selected? And save that value to combobox2? – Raskayu Dec 04 '16 at 17:35
0
Your question is not clear... but i hope the following code will help you to get an idea..first thing is to get selected value from combo1 and set combo2 selected value equals that value... also you need to make sure that that value should included (or present) in second combo box list...
xyx=Combobox1.SelectedValue;
comboBox2.SelectedValue = xyx;
if you want to change selected value of combo2 then you may need to place the code in "SelectedIndexChanged" event of combo box 1.

shijin
- 461
- 4
- 11