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: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}" />
My case is a bit different from what is discussed in the forum tread.
Top level is represented by an object, call it A. One of the properties in object A is another object, call if B. The collection I want to display on the next level is a property in object B. I have entered a field in the top level grid field layout for this nested grid. When the grid is displayed it displays (collection) for this field, but does not use my nested field layout.
I guess the problem is that my collection is in object B, but the grid usually will find the collection in object A.
Regards
Arnvid
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.