title: Attribute 'DisplayColumn' is not valid on this declaration type. It is only valid on 'class' declarations
body: <p>Just wondering why I get compile time error : </p>
  
  <blockquote>
    <p>"Attribute 'DisplayColumn' is not valid on this declaration type. It is only valid on 'class' declarations."</p>
  </blockquote>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.ComponentModel.DataAnnotations;
  
  namespace MyApplication.Models.DataAnnotations
  {
  
      [MetadataType(typeof(AppUser_DataAnnotations))]
      public partial class AppUser
      {
  
      }
  
      public class AppUser_DataAnnotations
      {
          [DisplayColumn("Name")]
          public string FirstName { get; set; }
      }
  }
  </code></pre>
  
  <p>I'm using above to override mvccontrib rendered grid column headers. Any idea why I get compile time error? Any help would be greatly appreciated.</p>