Hi. Could you, please, help me?
I have a collection of objects IEnumerable<T> where T is a Customer type:
class Customer {
public int Id {get; set;}
public string FullName {get; set;}
public City CustomerCity {get; set;}
}
where City class is:
class City {
public string Name {get; set;}
public string SomeAttribute {get; set;}
Also, I have a user control with XamDataGrid, where I set up DataSource property of XamDataGrid to collection of objects IEnumerable<Customer>. In code-behind file I bind properties to XamDataGrid like this:
....
var xamField = new Field();
xamField.Label = "Customer Full Name";
xamField.Name ="FullName";
xamFieldLayout.Fields.Add(xamField);
......
How I can bind properties City object to XamDataGrid. May be something like this :
xamField.PropertyPath = "CustomerCity.Name";
Thank you in advance.
Yes,
However, you should use UnboundField instead of Field. You can see this forum thread for more information on this:
http://community.infragistics.com/forums/p/31995/174963.aspx#174963
HTH