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
StackOverflowException with PersistenceManager using XamDataGrid

Hello!  I am trying to use the PersistenceManager to save the state of an XamDataGrid, but keep getting a StackOverflowException when I try to load the persisted state.

This seems to be a recurring issue:

One of the posts suggested the SaveCustomization/LoadCustomization methods, but they don't appear to store all the group expanded/collapsed information, which is what I was hoping to achieve.

Thanks, Ed

<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
        <igWPF:XamDataGrid x:Name="DataGrid" Grid.Row="0" BindToSampleData="True" />
        <Button x:Name="Button" Grid.Row="1" Content="Persist" />

 public partial class MainWindow : Window
        public MainWindow()
            this.Button.Command = new DelegateCommand<XamDataGrid>(PersistState);
            this.Button.CommandParameter = this.DataGrid;

        public void PersistState(XamDataGrid grid)
            MemoryStream ms = PersistenceManager.Save(grid);

            PersistenceManager.Load(grid, ms);  //StackOverflowException here