title: Editing column header of a datagridview
body: <p>Guys I need to get all the headers of my datagridview in a combobox and then on selection from the combobox I get the header in a textbox and when I modify In the textbox</p>
  
  <p>1.I get the modified header in the combobox.</p>
  
  <p>2.I get the modified header in the datagridview also.</p>
  
  <p>I did the following</p>
  
  <pre><code>  //fill in the combobox with the ACTUAL headers of the list box.
        for (int i = 0; i &lt;= listselected.columns.Count(); i++)
         {
                          comboedit.Items.Add(listselected.gridview.Columns[i].HeaderText);
  
                          comboedit.SelectionChanged += (sende, eee) =&gt;
                          {
                              //on user selection, display choice in textbox for editing
                              textedit.Text = comboedit.SelectedItem.ToString();
  
                          };
  
                      }  
                      textedit.TextChanged += (sende, eee) =&gt;
                      {//display EDITED text as header of the list box
                          listselected.gridview.Columns[comboedit.SelectedIndex].HeaderText = textedit.Text;   
                      };
  </code></pre>
  
  <p>However with this code I get only the modified header in the datagridview,the combobox is not updated.</p>
  
  <p>How should I modify the codes to do what i want ?</p>