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
  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I suggest you see this forum thread:

     

    http://es.infragistics.com/community/forums/t/30817.aspx

     

    where it is explained how to define the FieldLayouts, when you have hierarchical data.

     

    Feel free to write me if you have further questions.

Reply Children