Hi,
I have a grid that displays 4 collection - each one of different object type.
I'd like to use a style selector to load FieldLayout regarding the datatype of the items of the DataSource.
It doesn't seem possible to set it directly in Style :
<
Setter Property="FieldLayouts">
<Setter.Value>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="EuroReportingMonth" Label="Test Label" Column="0" ColumnSpan="1" Row="0" RowSpan="1" Visibility="Visible"/>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</Setter.Value>
</Setter>
What do you think about this ?
Hello MacCACIB,
Currently isn’t possible to set a style for the FieldLayouts, which is collection with elements of type FieldLayout . In order to achieve more flexible design of the XamDataGrid I can suggest you add the fields through the code behind in the collection xdg.FieldLayouts[0].Fields or handle the event AssigningFieldLayoutToItem. For further reference about this approach you can check the following link from our documentation:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamDataPresenter_Manually_Assigning_a_Field_Layout_to_xamDataPresenter.html
If you have any further questions or concerns on the matter, please do not hesitate to ask.
Hello Elena,
I found a workaround. I define as many field layout as I need in a resource dictionary.
Then in the FieldSettings, I set FieldLayout property with a StaticResource binding on the proper FieldLayout I previously defined as resource.