Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
How to bind field to properties of bound object
posted

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 int Id {get; set;}

  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.

 

Parents
No Data
Reply Children
No Data