title: How to Change a Gridview Control?
body: <p>I have a C# ASP.NET project with a gridview. The gridview has a dataset as a datasource.</p>
  
  <p>The grid includes a date field, but when you edit that field, you have to type in the date, and can't select a date since its a textbox.</p>
  
  <p>How will you go about changing the control of a gridview.</p>
  
  <p>This is what I've tried but it didn't work. (Just tried to convert all the textboxes to a calender as a test.</p>
  
  <pre><code>foreach (TableCell cell in grdViewDetails.Rows[e.RowIndex].Cells)
  {
     cell.Controls[0] = cell.Controls[0] as Calendar; //This didnt work....
     //do other stuff
  }
  </code></pre>