title: Change WebGrid cell into textbox form
body: <p>I have a dataset and I'm required to display it in a Web Application. Here is what the dataset looks like:</p>
  
  <pre><code>Point_ID    Project No.    Project Manager    Comments
  A007        1304           Oscar Duran        Found destroyed
  A008        1304           Oscar Duran        Helicopter access
  A009        1356           Julio Bravo        Airport parking lot
  </code></pre>
  
  <p>Here is what I have for my code:</p>
  
  <pre><code>@{
  var db = Database.Open("ControlPoints");                                            
  var SelectCommand = "SELECT * FROM AllControlMergedWD";                       
  var SearchTerm = "";                                                                
  
  if(!Request.QueryString["SearchCP"].IsEmpty() ){                                    
      SelectCommand = "SELECT * FROM AllControlMergedWD WHERE Point_ID = @0";         
      SearchTerm = Request.QueryString["SearchCP"];                                   
  }
  
  if(!Request.QueryString["SearchProject"].IsEmpty() ){                               
      SelectCommand = "SELECT * FROM AllControlMergedWD WHERE [Project Used on] LIKE @0";
      SearchTerm = "%" + Request["SearchProject"] + "%";
  }
  
  var SelectData = db.Query(SelectCommand, SearchTerm);                               
  var grid = new WebGrid(source: SelectData, rowsPerPage: 10);                        
  }
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Airborne Imaging Control Points Database&lt;/title&gt;
  
      &lt;style type="text/css"&gt; 
          .grid { margin: 4px; border-collapse: collapse; width: 600px; }
          .grid th, .grid td { border: 1px solid #C0C0C0; padding: 5px; }
          .head { background-color: #E8E8E8; font-weight: bold; color: #FFF; }
          .alt { background-color: #E8E8E8; color: #000; }                                  
      &lt;/style&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Airborne Imaging Control Points Database&lt;/h1&gt;&lt;br/&gt;&lt;br/&gt;                             
      &lt;form method="get"&gt;
          &lt;fieldset&gt;                                                                  
              &lt;legend&gt;Search Criteria&lt;/legend&gt;                                        
              &lt;div&gt;
                  &lt;p&gt;&lt;label for="SearchCP"&gt;Control Point ID:&lt;/label&gt;                   
                  &lt;input type="text" name="SearchCP" value="@Request.QueryString["SearchCP"]" placeholder="Leave blank to list all"/&gt; 
                  &lt;input type="submit" value="Search"/&gt;&lt;/p&gt;                               
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;p&gt;&lt;label for="SearchProject"&gt;Project:&lt;/label&gt;                          
                  &lt;input type="text" name="SearchProject" value="@Request.QueryString["SearchProject"]" /&gt;
                  &lt;input type="Submit" value="Search" /&gt;&lt;/p&gt;
              &lt;/div&gt;
          &lt;/fieldset&gt;
      &lt;/form&gt;
      &lt;div&gt;
          @grid.GetHtml(                                                          
              tableStyle: "grid",                                                 
              headerStyle: "head",                                                
              alternatingRowStyle: "alt",                                         
              columns: grid.Columns(
                  grid.Column("Point_ID"),
                  grid.Column("Project No."),
                  grid.Column("Project Manager"),
                  grid.Column("Comments", format: @&lt;text&gt;@Html.TextBox("Comments")&lt;/text&gt;)
              )
          )
          &lt;br/&gt;&lt;br/&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What I have been trying to do is turning the 'Comments' cells into form elements (text box), so that anybody with access to the Application will be able to add comments, edit or update statuses of the current condition of the points. Could you please help me achieving that?</p>
  
  <p>Thank you beforehand.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I was able to add the text box field in the 'Comments' column (I have updated my code above). Now what I have left is saving the comments that are entered into the database.</p>