title: "A data source must be bound before this operation can be performed"
body: <p>I am trying to display a grid in the MVC 3, 
  I got the following error:</p>
  
  <p><strong>A data source must be bound before this operation can be performed.</strong></p>
  
  <p><strong>this is my Model:</strong> </p>
  
  <pre><code>   public class EmpModel
      {
          public string UserName { get; set; }
          public string Password { get; set; }
          public int EmpID { get; set; }
          public string EName { get; set; }
          public int Age { get; set; }
          public string Gender { get; set; }
          public string Qualification { get; set; }
          public string Address { get; set; }
          public string EmailID { get; set; }
          public int DeptID { get; set; }
          public string DeptName { get; set; }
          public string DeptHead { get; set; }
          public int Deptnumber { get; set; }
      }
  </code></pre>
  
  <p><strong>This is Controller:</strong></p>
  
  <pre><code>TestMVCEntities testEmp = new TestMVCEntities();
  EmpModel empmod = new EmpModel();
  public ActionResult Index()
  {
      List&lt;EmpModel&gt; emp = new List&lt;EmpModel&gt;();
      return View();
  }
  </code></pre>
  
  <p><strong>This is my View:</strong></p>
  
  <pre><code>@model IEnumerable&lt;EmpApplication.Models.EmpModel&gt;
  @{
      ViewBag.Title = "Index";
      WebGrid grid = new WebGrid();
  }
  
  &lt;h2&gt;List of Employee&lt;/h2&gt;
  
  @grid.GetHtml(columns: new [] {
      grid.Column("EmpID"),
      grid.Column("EName"),
      grid.Column("EmailID"),
      grid.Column("Qualification")
  })
  </code></pre>