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
65
How to set Field Name to a (Nested)Sub Property
posted

 I'm using entity framework classes as my datasource

The class is OrderDetail which have these properties:
ID (int)
Item(Class Item)
Quantity (int)
Subtotal (decimal)

Class Item has these properties
ID (int)
Name (string)

So i set the xamDataGrid.Datasource =  List(of OrderDetail)

I want to show the columns: Item.Name, Quantity, and Subtotal

So I specified 3 fields. I'm having problem setting the Field Name for Item.Name. "Item.Name" doesn't work, if I use that I get a blank grid.

Is this at all possible? I can easily bind "Item.Name" within a ListBox DataTemplate, how do I this with xamDataGrid.

Thank you

Parents Reply Children
No Data