How to update the values in a combobox triggered by another combobox?
问题 I have 2 comboboxes in a form. I'd like the selected value in combobox1 to change when the list in combobox2 gets updated. For Example: ComboBox1 has names of mobile companies and ComboBox2 containing the list of all mobile phones of that company. 回答1: Assume you have a dictionary that associates phone models to their manufacturers: Dictionary<string, string[]> brandsAndModels = new Dictionary<string, string[]>(); public void Form_Load(object sender, EventArgs e) { brandsAndModels["Samsung"]