I have a List of customers that I'm trying to bind to a DataGridView. I have two data classes that looks like:
public class Customer
{
public string Name { get; set; }
public AddressDetail Address { get; set; }
}
public class AddressDetail
{
public string StreetAddress { get; set; }
public string City { get; set; }
}
Then when I try to populate the DataGridView, I use:
CustomerInfo custInfo = new CustomerInfo();
CustomerGrid.DataSource = custInfo.GetCustomers();
GetCustomers will return a List of Customer. My problem is the Address Column is only one column and shows "Address" in the column. What's the best way to display columns for all members of Address class in the DataGridView.