简体   繁体   中英

C# multiple comboboxes

I am writing a program that has two tabs on it. On the first tab the user must enter information about an account(account number, name, address, and phone #). They must also enter investment information(ID,Name,symbol, and shares). Whenever the user clicks on the add customer button, the name of the person goes to a combobox on the second tab. Whenever the user enters information about the investments the name of the investment goes into a listbox on the first tab. The issue I face is that whenever i select an account from the combobox on the second tab, i need an investment combobox to show only the entries for that account and not everysingle one entered while the program has been up. I need to choices from the Investment combobox to be determined by the selection in the customer combobox.

here's the first tab 在此输入图像描述

and here's the second 在此输入图像描述

Hook up a function to the SelectedIndexChanged event of the ComboBox. When it runs, you can fill up the other ComboBox.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM