title: How to add datagridview column header text as combobox items, C#..?
body: <p>I have a datagridview with multiple columns in form1 and my form2 contains number of comboboxs. Here, i like to add (form1) datagridview columns header text as (form2) combobox items.</p>
  
  <p>already i tried this in form2,</p>
  
  <pre><code>try
  {
    Form1 F1 = new Form1();
  
    comboBox1.Items.Add(F1.dataGridView1.Columns[0].HeaderText);
    comboBox1.Items.Add(F1.dataGridView1.Columns[1].HeaderText);
    comboBox1.Items.Add(F1.dataGridView1.Columns[2].HeaderText);
    comboBox1.Items.Add(F1.dataGridView1.Columns[3].HeaderText);
    comboBox1.Items.Add(F1.dataGridView1.Columns[4].HeaderText);
    comboBox1.Items.Add(F1.dataGridView1.Columns[5].HeaderText);
  }
  catch{}
  </code></pre>
  
  <p>but no use.. can anyone help regarding my request.</p>