title: Bind ASP.NET 2.0 GridView to my own IList<T>.SomeMemberOfMyOwnCustomType.SomeProperty
body: <p>Let's say I have data like such:</p>
  
  <pre><code>class Location
  {
      public int Id { get; private set; }
      public string City { get; set; }
      public string State { get; set; }
      public string Country { get; set; }
  }
  
  class Friend
  {
      public int Id { get; }
      public string FriendName { get; set; }
      public Location Address { get; set; }
      public int Age { get; set; }
      public bool IsReliable { get; set; }
  }
  </code></pre>
  
  <p>Let's say I bind an ASP.NET 2.0 GridView control to my own IList like so:</p>
  
  <pre><code>GridView1.DataSource = new List&lt;Friend&gt;
  {
      new Friend { Name = "...", Age = 22, ... }
  };
  
  GridView1.DataBind();
  </code></pre>
  
  <p>But I want to have only the following columns in my GridView with the following custom captions/column headers:</p>
  
  <ol>
  <li>FriendName (Column Caption: Friend Name)</li>
  <li>City  (Column Caption: City)</li>
  <li>Age (Column Caption: Age)</li>
  </ol>
  
  <p>How do I do that?</p>
  
  <p>In other words, how do I bind a GridView control to a custom members of my own custom IList selectively?</p>