I can’t solve this problem. I need to populate comboBox items from values in listBox (Windows Form in C#).
Every time I add values in listbox, combobox automatically has to be populated.
Thanks in advance.
this is code, but now working
for (int i = 0; i < listBox1.Items.Count; i++)
{
comboBox1.Items.Add(listBox1.Items[i]);
}
I would suggest loading the strngList variable using a loop or if the data is coming from a database load the fields that way then Bind to the ComboBox.