title: Clearing a ComboBox
body: <p>I have tried all the possible ways to clear the data inside a combo box, but surprisingly nothing is working. </p>
  
  <p>I want my <code>combobox1</code> to load some value into <code>combobox2</code> in the selected index of <code>combobox1</code> changes. The values are loaded, but when I move to the next index I have written this code:</p>
  
  <pre><code>if (SView._StudentSchool_.Equals("Pre-School")) 
  {               
      TB.TimeBlock("Pre-School");
      comboBox3.Enabled = true;
      comboBox3.Items.Clear();
  
      for (int i = 1; i &lt; TB.i+1; i++) 
      {
          comboBox3.Items.Add(TB.TimeBlock_[j]);
          j++;
      } 
  }
  else if (SView._StudentSchool_.Equals("Kindergarten")) 
  {                 
      TB.TimeBlock("Kindergarten");
      comboBox3.Enabled = true;
      comboBox3.Items.Clear();
  
      for (int i = 1; i &lt; TB.i + 1; i++)
      {
          comboBox3.Items.Add(TB.TimeBlock_[j]);
          j++;
      }
  }
  else if (SView._StudentSchool_.Equals("Primary School")) 
  {
      TB.TimeBlock("Primary School");
      comboBox3.Enabled = true;
      comboBox3.Items.Clear();
  
      for (int i = 1; i &lt; TB.i + 1; i++)
      {
          comboBox3.Items.Add(TB.TimeBlock_[j]);
          j++;
      } 
  }
  </code></pre>
  
  <p>The <code>Clear()</code> function is not working, neither do the other methods like <code>.datasourse = null</code> or <code>.Text = ""</code> or removing items using a loop like this:</p>
  
  <pre><code>for (int i = 0; i &lt; comboBox3.Items.Count; i++)
  {
      comboBox3.Items.RemoveAt(i);
      i--;
  }
  </code></pre>