i'm populating a datagrid programmatically but before setting the itemsource, i'm also programmatically adding the datagrid columns.
DataGridTextColumn col = new DataGridTextColumn();
col.Header = "MyCol";
col.Binding = new Binding("PropertyOFObject");
dataGrid.Columns.Add(col);
it's easy to set the binding to the properties of my object that are concrete however, as a property of this object, i have a list of another object type. now, for each instance of the second object type in that list, i'd like another column to my grid, populated with a specific property of that instance of the second object type.
how would i go about doing that in this same fashion of programmatically adding the columns and setting the bindings?