I am trying to bind a Silverlight Datagrid to an ObservableCollection<T>.
Specifically I have ObservableCollection<Target> where target has the following properties: Hierarchy and Item.
I only want the datagrid to display information for the Hierarchy class but when the user selects a row I want both the Hierarchy and the item properties of the Target class to be available in code.
Is this possible?
Thanks.
Specify paths for the Hierarchy properties in your columns like this:
Full example below:
MainPage.xaml
MainPage.cs