title: A data source must be bound before this operation can be performed on MVC 5
body: <p>I am trying to display the grid on the view and it's giving me an error on the gird. This is the view</p>
  
  <pre><code>@{var grid = new WebGrid(Model, canPage: true, rowsPerPage: 20,
        selectionFieldName: "selectedRow", ajaxUpdateContainerId: "gridContent");
       grid.Pager(WebGridPagerModes.NextPrevious);
       ViewBag.Title = "Data results";
  }
  
  @{
      ViewBag.Title = "Results";
      Layout = "~/Views/Shared/_InternalLayout.cshtml";
  }
  
  &lt;h2&gt;Data Results&lt;/h2&gt;
  &lt;div id="gridContent"&gt;
      &lt;p class="text-success"&gt;@ViewBag.Result&lt;/p&gt;
      &lt;p class="text-danger"&gt;@Html.ValidationMessage("Error")&lt;/p&gt;
  
  @using (Html.BeginForm("ReportTable", "ControllerName", FormMethod.Get))
  {
      @grid.GetHtml(
  
     tableStyle: "webGrid2 ReportTable",
                           headerStyle: "header",
                           alternatingRowStyle: "alt",
                           selectedRowStyle: "select",
                           columns: grid.Columns(
                                    grid.Column("Number", "Destination", canSort: false),
                                    grid.Column("Received", "Receive Time", canSort: false),
                                    grid.Column("Message", "Message", canSort: false),
                                    grid.Column("Resubmit", format: @&lt;text&gt;&lt;input class="chkbox" id="resubChkbx" name="ResubmitChkbx" type="checkbox" value="@item.ID" /&gt;&lt;/text&gt;)
                          ))}
  &lt;/div&gt;
  </code></pre>
  
  <p>And this is the controller</p>
  
  <pre><code>public ActionResult ReportTable()
          {
              return View("ReportTable");
  
  }
  </code></pre>
  
  <p>The error code that I get is the following:</p>
  
  <blockquote>
    <p>A data source must be bound before this operation can be performed</p>
  </blockquote>
  
  <p>And highlights @grid.Gethtml</p>