ERROR: Additional information: Items collection cannot be modified when the DataSource property is set
<p>I'm having this issue with a program that adds files to my combobox and also added to database.</p>

<p>I had 2 button add+ and - to delete the fields one by one on combobox</p>

<p>when i click ADD + button the data in my orm that means i have another combobox, lable,datetimepicker these are added in my FAVORITES combobox</p>

<pre><code>combofavorite.Items.Add("Report Type: " + cmbreporttype.Text + " Date From: " + dateTimePicker1.Text + " To: " + dateTimePicker2.Text);
            combofavorite.SelectedIndex = 0;
            MessageBox.Show("Add Report Type: " + cmbreporttype.Text + " Date From: " + dateTimePicker1.Text + " To: " + dateTimePicker2.Text + " TO Favorite", "Added to Favorite", MessageBoxButtons.OK, MessageBoxIcon.Information);
</code></pre>

<p>Add the added data in the combobox is also added into database table</p>

<pre><code> MySqlConnection connection = new MySqlConnection(MyCon);
            MySqlCommand cmd = new MySqlCommand("INSERT INTO favorite (favorite) VALUES (@favo)", connection);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.AddWithValue("@favo", combofavorite.Text);
            connection.Open();
            cmd.ExecuteNonQuery();



 private void cmbfav_SelectedIndexChanged(object sender, EventArgs e)
        {
            string ID = cmbfav.SelectedValue.ToString();
        }
</code></pre>

<p>When i try this i got an error on here.</p>

<p><a href="https://i.stack.imgur.com/DxBGc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DxBGc.png" alt="enter image description here"></a></p>

<p>Plese help me to solve my problem .</p>