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
440
Binding issue in hierarchy Grid
posted

I want to bind my DataGrid to a data source that has some simple properties and an object.  The second level collection is located in this inner object.  How can I define this field in the top level grid to make xamDataGrid understand that this is the collection the second level grid will be bound to?

This property is named Sections held by the object WellDesign.  The collection Sections is a BindingList.  xamDataGrid tells me it is a collection, but that is all, when I run this view

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<ig:XamDataGrid.FieldLayouts>

<ig:FieldLayout x:Name="designGrid" Tag="Sections" Settings="{StaticResource ReadWriteGridTwoHeaderRows}">

 

 

 

 

 

<ig:FieldLayout.Fields>

 

 

 

 

 

<ig:UnboundField Binding="{Binding WellDesign.Sections}" BindingMode="OneWay" Label="Sections" Column="1" Row="1" />

 

 

 

 

 

<ig:Field Name="CaseDesignId" Label="CaseDesignId" Column="2" Row="1"/>

 

 

 

 

 

<ig:Field Name="WellDesignId" Label="WellDesignId" Column="3" Row="1"/>

 

 

 

 

 

<ig:UnboundField Binding="{Binding WellDesign.DesignName}" BindingMode="OneWay" Label="Design" Column="4" Row="1" />

 

 

 

 

 

</ig:FieldLayout.Fields>

 

 

 

 

 

</ig:FieldLayout>

 

 

 

 

 

<ig:FieldLayout x:Name="sectionGrid" Settings="{StaticResource ReadWriteGridTwoHeaderRows}">

 

 

 

 

 

<ig:FieldLayout.Fields>

 

 

 

 

 

<ig:Field Name="SectionId" Column="0" Row="1" Label="Id" Settings="{StaticResource ReadOnlyTextFieldSettings}" />

 

 

 

 

 

<ig:Field Name="Name" Label="Name" Column="1" Row="1" Settings="{StaticResource ReadOnlyTextFieldSettings}" />

 

 

 

 

 

</ig:FieldLayout.Fields>

 

 

 

 

 

</ig:FieldLayout>

Parents Reply Children