title: Value of Column Name DataGridView
body: <p>I'm using Visual Studio 2010 and i'm developing a windows form. Right now I'm using a data grid view and i want to write some functions that would allow you to automaticlly edit the datagrid by just changing the text in the Datagrid view. Right now, I am able to get the actual value but I need the value of the column in order to use it as a parameter when i use ADO.net here's what my code looks like now</p>
  
  <pre><code>    private void dgv_DataLookup_CellValueChanged(object sender, DataGridViewCellEventArgs e)
      {
          DialogResult dr;
          dr = MessageBox.Show("Are you sure you want to edit this field?", "Edit Cell", MessageBoxButtons.YesNo);
  
          if (dr == DialogResult.Yes)
          {
              DataGridViewCell editItemCell = dgv_DataLookup[dgv_DataLookup.CurrentCell.RowIndex, dgv_DataLookup.CurrentCell.ColumnIndex];
              string editItem = editItemCell.Value.ToString();
  
  
          }
      }
  </code></pre>
  
  <p>this here gets me the value of the current cell that is currently selected. I tried doing something like this</p>
  
  <p>DataGridViewColumns columnCells = dgv_DataLookup.CurrentCell.ColumnIndex.Value.ToString()... something that would represent this but actual code. thanks! </p>