Accessing the properties of a class which contains a property of another class
<pre><code>public class Customer
{
    public int id { get; set; }
    public Person CustPerson { get; set; }
    public Customer()
    {
        this.CustPerson = new Person();
    }
}

public class Person
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public int Age { get; set; }
}

private void button1_Click(object sender, EventArgs e)
{
    List&lt;Customer&gt; CustomerList=new List&lt;Customer&gt;();
    for (int i = 0; i &lt;= 4; i++)
    {
        Customer cust = new Customer();
        cust.id = i;
        cust.CustPerson.FirstName = "john" + i.ToString();
        cust.CustPerson.LastName = "deo" + i.ToString();
        cust.CustPerson.Age = 20 + i;
        CustomerList.Add(cust);
    }
    dataGridView1.DataSource = CustomerList;
}
</code></pre>

<p>I want <code>firstname</code>, <code>lastname</code> &amp; <code>age</code> to be printed in the <code>gridview</code>, but I am getting a single column, instead of three, which contains <code>mynamespace.person</code> :-(</p>

<p>Help me out guys... any help is appreciated. </p>
