title: Two Controls in the same Column of the WebGrid
body: <p>I have a webGrid with 2 columns and in the first column I have Dates and in Second Column I have one more WebGrid which contains Data according to that Date. Now what I want is I want a Button in the same column in which I have my inner WebGrid.</p>
  
  <p>How can I make that happen..My inner webgrid contains 4 columns in which 2 of them holds DropdownList and other two holds textbox.
  I want Button outside this inner WebGrid but inside the Main webGrid.</p>
  
  <p>I hope I am Clear..</p>
  
  <p>Here is My code</p>
  
  <pre><code>var grid = new WebGrid(Model, rowsPerPage: 100); 
  @if (Model != null)
  {
  
      @grid.GetHtml(htmlAttributes: new { id = "EmployeeTasksGrid" },
              tableStyle: "webGrid",
              headerStyle: "header",
              alternatingRowStyle: "alt",
              selectedRowStyle: "select",
  
  columns:
    grid.Columns(
    grid.Column("TaskDate", "Task Date", style: ""),
      grid.Column("EmployeeTask", "Details", format: (resource) =&gt;
      {
  
          WebGrid resParamGrid = new WebGrid(resource.EmpTasks);
          return resParamGrid.GetHtml(htmlAttributes: new { id = "EmployeeTasksSubGrid" },
              tableStyle: "webGrid subgrid",
      headerStyle: "header",
  
      selectedRowStyle: "select",
  
              columns: resParamGrid.Columns(
              resParamGrid.Column("Projects", "Project name",
      format:
          @&lt;div class="taskname selector projects"&gt;
              @Html.DropDownList("Projects", null, "--Select--", new { id = "ddl_Projects" })
          &lt;/div&gt;, style: "TaskNameWidth"),
       resParamGrid.Column("TaskNames", "Task name",
      format:
          @&lt;div class="taskname selector tasks"&gt;
              &lt;input type="hidden" class="hdnActivityId" name="ActivityId" value="@item.ActivityID"/&gt;
              &lt;input type="hidden" class="hdnRecordId" name="RecordID" value="@item.RecordID"/&gt;
              &lt;input type="hidden" class="hdnTaskID" name="TaskName" value="@item.TaskID"/&gt;
              &lt;input type="hidden" class="hdnProjectID" name="ProjectID" value="@item.ProjectID"/&gt;
              &lt;input type="hidden" class="hdnTaskDate" name="TaskDate" value="@item.TaskDate"/&gt;
              &lt;input type="hidden" class="hdnIsFreezed" name="IsFreezed" value="@item.IsFreezed"/&gt;
              @Html.DropDownList("TaskNames", null, "--Select--", new { id = "ddl_Tasks", style = "tasksnew" })
          &lt;/div&gt;, style: "TaskNameWidth"),
                         resParamGrid.Column("TaskDescription", "Task Description", format: @&lt;text&gt;&lt;textarea
                             rows="3" cols="3" class="taskDiss input"&gt;@item.TaskDescription&lt;/textarea&gt;
      &lt;/text&gt;, style: "col2Width"),
      resParamGrid.Column("Hours", "Hours", format: @&lt;text&gt;&lt;input type="text" id="Hours" value="@item.Hours" class="Hours input" onkeypress="javascript:return AllowDecimalNumber(this);"  /&gt;
      &lt;/text&gt;, style: "col1Width"),
                         resParamGrid.Column("", style: "delete", format: @&lt;text&gt;
      &lt;input type="button" class="delete-task input" /&gt;
      &lt;/text&gt;, canSort: false)
              ),
  
              displayHeader: true
  
          );
  
     })
  </code></pre>