I had to find out how to set values into ComboBox items
So i have a combo box with two string items and each item make some changes on other combo box then save to xml
Now i tried to set value for this items but the problem is the xml output shows only 1 value
- comReg.DisplayMember = "Item 1";
- comReg.ValueMember = "1";
- comReg.DisplayMember = "Item 2";
- comReg.ValueMember = "2";
- comPer.Items.Clear();
- switch (comReg.SelectedItem.ToString()) {
- case "Item 1":
- comPer.Items.AddRange(new string[]{"1", "2", "3", "4" });
- break;
- case "Item 2":
- comPer.Items.AddRange(new string[]{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"});
- break;