I have a grid bound to a list of entity objects and each one has a child list but each child list only has one item (row per say)
Our designers do not want to show a child row, So is there a way to directly bind to a field property in the first row of a child list thru the xaml?
I know some code workarounds to handle this but I'm hoping there is a wasy to do this in xaml
yes this worked great thanks!
Hello,
I am just checking if you got this worked out, or you still require any assistance, or clarification on the matter.
If this is what you were looking for please verify the answer so it helps other users as well.
Very easy to do in XAML. Just use string indexers on the child collection.
<ig:XamGrid ItemsSource="{Binding People}" AutoGenerateColumns="False" >
<ig:XamGrid.Columns>
<ig:TextColumn Key="FirstName" HeaderText="Parent First" />
<ig:TextColumn Key="LastName" HeaderText="Parent Last" />
<ig:TextColumn Key="Children[0].FirstName" HeaderText="Child First" />
<ig:TextColumn Key="Children[0].LastName" HeaderText="Child Last" />
</ig:XamGrid.Columns>
</ig:XamGrid>