I would like to bind a column in my DataGridView class to a record in a second level object in C # using .NET 4.0. For instance:
I have an object A:
public class A
{
public long id;
public B bClass;
}
and object B
public class B
{
public long id;
public string name;
}
Is there a way to declare a list of class A as a data source in a DataGridView, but bind one of the columns to the name attribute in class B?
I redid it a bit, but I hope it doesn’t bother. Thanks for the help!
source
share