title: Getting values from Textboxes from webgrid MVC4 for checkbox selected columns
body: <p>I am having a webgrid in partialView  with checkboxes and TextBox controls </p>
  
  <pre><code>@model List&lt;Models.Services.Info.ServiceListDetails&gt;
  
  &lt;div class="grid_content"&gt;
                      @grid.GetHtml(
                                   tableStyle: "table", //"gridTable",
                                   headerStyle: "gridHead",       
                          //tableStyle: "table",
                          //headerStyle: "thead",             
                          footerStyle:"gridFooter",
                          rowStyle:"gridRow",                 
                          alternatingRowStyle: "gridAltRow",
                          columns :   grid.Columns(grid.Column(format: @&lt;text&gt; &lt;input type="checkbox" value="@item.Id" name="ids" id="assignChkBx" /&gt; &lt;/text&gt;, header: "{checkall}"),
                                      grid.Column("ServiceName",header:"Services", style: "col2"),
                                      grid.Column("ServicelistUnit",header:"Unit",style: "col2"),                    
                                      grid.Column("Quantity",format: (item) =&gt; @Html.TextBox("ServicelistQuatity",@item.ServicelistQuatity as object)),
                                      grid.Column("Remarks", format: (item) =&gt; @Html.TextBox("ServicelistRemarks", @item.ServicelistRemarks as object))
                              )    
                          )
  </code></pre>
  
  <p></p>
  
  <p>I need to get the values entered to textboxes for the selected columns on click of Preview button</p>
  
  <p>Model </p>
  
  <pre><code> public class ServiceListDetails
  {
      private long mId = 0;
      private long mUserXId = 0;
      private long mSessionXId = 0;
      private string mServicelistQuatity = "";
      private string mServicelistRemarks = "";
      private string mRequestId = "";
      private int mOption = 0;
      private string mServicelistUnit = "";
      private string mServicename = "";
  
      public long Id
      {
          get { return mId; }
          set { mId = value; }
      }
  
      public long UserXId
      {
          get { return mUserXId; }
          set { mUserXId = value; }
      }
  
      public long SessionXId
      {
          get { return mSessionXId; }
          set { mSessionXId = value; }
      }
  
      public string RequestId
      {
          get { return mRequestId; }
          set { mRequestId = value; }
      }
  
     public string ServicelistQuatity
      {
          get { return mServicelistQuatity; }
          set { mServicelistQuatity = value; }
      }
  
      public string ServiceName
      {
          get { return mServicename; }
          set { mServicename = value; }
      }
  
      public string ServicelistRemarks
      {
          get { return mServicelistRemarks; }
          set { mServicelistRemarks = value; }
      }
  
      public string ServicelistUnit
      {
          get { return mServicelistUnit; }
          set { mServicelistUnit = value; }
      }
  
  }
  </code></pre>
  
  <p><em>Controller</em> </p>
  
  <pre><code>   public ActionResult PreviewSerReqs(FormCollection form)
     {
        return View();
     }
  </code></pre>
  
  <p>I am actually new to MVC. How do I capture the data from textboxes on click of Preview button.
  Please any help really appreciated.</p>
  
  <p>Thanx</p>