Luke thanks for the answer.
It sort of helps but say you have more than one property on the sub object
you want to access through the datapropertynam e for each column
eg.
col1.DataProper tyName = "Address.ci ty"
col2.DataProper tyName = "Address.postco de"
public class Address
{
private string _City;
private string _postcode
public string PostCode
{
get { return this._PostCode; }
set { this._PostCode = value; }
}
public string City
{
get { return this._City; }
set { this._City = value; }
}
public Address()
{
this._City = "";
}
public override string ToString()
{
return this._City;
}
}
--
Life in the sun
"WayDownUnd er" wrote:
I have a datagridview that is bound to a cutom collection.
The classes contained in the custom collection have the properties that are
bound to the class . This works fine !
But if one of the properites exposes another object I would like to bind a
property of the sub object to the DataPropertyNam e this does not seem to
work.
eg main object customer
has a property called Address which is a contained object
inside object Address there is property call city.
so DataPropertyNam e = "Address.ci ty"
does not work !
Any ides
--
Life in the sun