Dear Forum,
I am a relatively new developer of Infragistics.
Currently I am trying to save the order and the Width of the Fieldlayout - Fields in a XamTreeGrid.
When I save the PersistenceManager.Save it creates a XML File
Only Loading causes a Crash.
Here the Code
[Code]
<Custom:XamTreeGrid x:Name="myTreeGrid" BindToSampleData="True" IsSynchronizedWithCurrentItem="False" Margin="0,0,6,3" Theme="IGTheme"> <Custom:XamTreeGrid.FieldLayoutSettings> <Custom:FieldLayoutSettings AutoArrangeCells="Never" AutoGenerateFields="False"/> </Custom:XamTreeGrid.FieldLayoutSettings> <Custom:XamTreeGrid.FieldSettings> <Custom:FieldSettings CellHeight="80" FilterClearButtonVisibility="Visible" FilterEvaluationTrigger="Default"/> </Custom:XamTreeGrid.FieldSettings> <Custom:XamTreeGrid.FieldLayouts> <Custom:FieldLayout> <Custom:Field Name="email" Row="0" Column="0" Width="60"/> <Custom:Field Name="name" Row="0" Column="1" Width="70"/> <Custom:Field Name="salary" Row="0" Column="2" Width="80"/> <Custom:Field Name="department" Row="0" Column="3" Width="90"/> </Custom:FieldLayout> </Custom:XamTreeGrid.FieldLayouts> </Custom:XamTreeGrid>
[/Code]
[url=http://postimg.org/image/d51dyoi5d/][img]s24.postimg.org/.../url]
What am I doing Wrong?
Download sample project here
Hello Max,
Thank you for contacting us!
I have been looking into your question and into the sample application, that you have provided. From it I understand, that you want to save the layout only for the XamTreeGrid.
As the XamTreeGrid inherits from DataPresenterBase I can suggest using the SaveCustomizations and LoadCustomizations methods in order to save/load the layout of the XamTreeGrid.
More about the above mentioned methods you can find on the following links from our documentation: http://help.infragistics.com/Help/Doc/WPF/2015.2/CLR4.0/html/xamDataPresenter_Save_Field_Customizations.html, http://help.infragistics.com/Help/Doc/WPF/2015.2/CLR4.0/html/xamDataPresenter_Load_Field_Customizations.html.
I have also updated the provided sample application with the above mentioned functionality. Please the modified sample application attached and feel free to let me know if you have any further questions on this matter.
Thank you Gergana!
That was exactly what I was looking for!
now it works :)
yours
Max