title: How to load values in ComboBox dynamically using C# windows application
body: <p>I have a problem in loading data in ComboBox. I have 30 ComboBox in a windows form. Name of the ComboBox is like cmbStatus1, cmbStatus2, cmbStatus3 .......... cmbStatus30. I want to load the same value using database in ComboBox. My code is :<code>enter code here</code></p>
  <pre><code>for (int i = 1; i &lt;= 30; i++)
  {
  var comboBox = new CustomComboBox();
  comboBox.Name = &quot;cmbStatus&quot; + i.ToString();
  
  comboBox.DataSource = combox.FetchData_Examination_Status();
  comboBox.DisplayMember = &quot;ESTATUS&quot;;
  comboBox.ValueMember = &quot;ID&quot;;
  //cmbStatus1.Refresh();
  }
  </code></pre>
  <p>But data is not loaded to this ComboBox. Pls help.</p>