title: MVC3: How to return table structure as EditorFor
body: <p>Im wanting to create an editor for a List of Models which exists as a property in my ViewModel class.</p>
  
  <p>ViewModel class:</p>
  
  <pre><code>public class FooManagementDetailViewModel : ViewModelBase
  {
      public List&lt;FooPermissionModel&gt; FooPermissions { get; set; }
  </code></pre>
  
  <p>Model class:</p>
  
  <pre><code>public class FooPermissionModel
  {
      public string Name { get; set; }
      public string Reason { get; set; }
      public bool Selected { get; set; }
  }
  </code></pre>
  
  <p>EditorTemplate:</p>
  
  <pre><code>@model FooPermissionModel
  &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;
                  Heading
              &lt;/th&gt;
              &lt;th&gt;
                  Heading
              &lt;/th&gt;
              &lt;th&gt;
                  Heading
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  @Html.TextBoxFor(x =&gt; x.Name, new { @readonly = "readonly" })
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.CheckBoxFor(x =&gt; x.Selected)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.TextBoxFor(x =&gt; x.Reason)
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>   &lt;fieldset&gt;
        &lt;legend&gt;FooBarTitle&lt;/legend&gt;
           &lt;div&gt;
               @Html.EditorFor(x =&gt; x.FooPermissions)
           &lt;/div&gt;
     &lt;/fieldset&gt;
  </code></pre>
  
  <p>What im being returned is a single div of the Names only. No structure at all. 
  What am i missing?</p>
  
  <p>Thanks!</p>