I have two classes:
public class Contact{
public string contact { get; set; }
public string contact_type { get; set; }
}
public class Person{
public string first_name { get; set; }
public string last_name { get; set; }
Contact phone
}
In my asp.net application I need to see list of persons in a gridview. I use ObjectDataSource to bind List. But only two columns: first_name and last_name are presents in the gridview. It is important to see contact of person. In other words, how to bind subclass Contact to the same gridview. What is the best way to do this? I don't like idea to use DataTable. Thanks!