title: Using MVC3 WebGrid - Column does not exist error
body: <p>I am getting this error - System.InvalidOperationException: Column "UserID" does not exist.</p>
  
  <p>This is my View Model.</p>
  
  <pre><code>public class UserVM
  {
      public int UserID;
      public string Name;
  }
  </code></pre>
  
  <p>This is my action method in the controller.</p>
  
  <pre><code>public ActionResult TestGrid()
  {
      List&lt;UserVM&gt; rows = new List&lt;UserVM&gt;();
      rows.Add(new UserVM { UserID = 100, Name = "Abc" });
      rows.Add(new UserVM { UserID = 101, Name = "Def" });
      rows.Add(new UserVM { UserID = 102, Name = "Ghi" });
      return View("TestGrid", rows.AsEnumerable());
  }
  </code></pre>
  
  <p>This is my view.</p>
  
  <pre><code>@model IEnumerable&lt;Module.ViewModels.UserVM&gt;
  @{
      var grid = new WebGrid(Model);
  }
  
  &lt;div&gt;
  @grid.GetHtml(
      columns: grid.Columns(
          grid.Column("UserID", header: "User ID"),
          grid.Column("Name", header: "Name")
      )
  )
  &lt;/div&gt;
  </code></pre>
  
  <p>That's it. Any idea why I am getting the error?</p>