title: ASP.NET GridView is there a way to get column name based on the cell you are in
body: <pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  {
  
       if (e.Row.RowType == DataControlRowType.DataRow)
       {
           foreach (TableCell cell in e.Row.Cells)
           {
               // .... here ....
               cell.Text = cell.Text.Replace(entry.Value, "&lt;span class='highlightSearchTerm'&gt;" + entry.Value + "&lt;/span&gt;");
           }
       }
  
  }
  </code></pre>
  
  <p>The part where it says .... here .... I need to somehow get the column name of the DataGrid. So based on which cell I am CURRENTLY in I need to get a Column name. Later in the code depending which Column I am in I need to do different formatting for the cell. Also Column names are not know at run time they are generated on the fly so I need a generic method to get a Column name. </p>