Current filter:
                                You should refresh the page.
                                  • I have Hybrid generated App from version 15, been using version 17 and all has been working. Now I  have updated to 19.1.6.

                                    Notice a few issues with PersistentLayoutHelper .

                                    No longer saves any changes to a Datagrid columns.

                                    The PersistentLayoutHelper.ResetLayout(); does not clear and reset the layouts. I have had version 17 and if I invoke this function and exit my app it would clear all layouts.

                                Show all comments
                                • Dima (DevExpress Support) 10.11.2019

                                  Hello Steve,

                                  I reproduced the issue and passed this ticket to our R&D team for further research. Once we have any result, we will notify you.

                                  In the meantime, I suggest you use our scaffolding wizard to create a view in version 19.1 and see how we use LayoutSerializationService and CurrentWindowSerializationBehavior. These components work with a layout now instead of PersistentLayoutHelper.

                                • Dima (DevExpress Support) 10.14.2019

                                  Hello Steve,

                                  It looks like I was too hasty in my statement. I worked with the Hybrid UI Demo Application Created Using Scaffolding Wizards example and added PersistentLayoutHelper to it. I also modified base view models to support layout saving and restoring but did it incorrectly. This is the reason why the issue occurred on my side. Please accept my apologies for this inconvenience.

                                  Attached is the modified example. Check GridControl in EmployeeTaskCollectionView. If I missed something important, please modify the sample to demonstrate the issue.

                                • Steve Holt 10.15.2019

                                  Ok thanx for the clarification. Here is what I have found. The Grid Layouts that do not work are derived by InstantFeedbackCollectionViewModel. So the only section that is not saved is the columns. Can you verify this on your end.


                                • Ivan (DevExpress Support) 10.16.2019

                                  Hi Steve,

                                  This issue does not appear in an application generated by new Scaffolding Wizard versions (see, but I recall that we discussed a similar issue in older versions in the Visual layout is not restored when using InstantFeedbackCollectionViewModel ticket. That time, I suggested the following workaround for older versions:

                                  Messenger.Default.Register<CloseAllMessage>(this, m => { if (m.ShouldProcess(this)) { SaveLayout(); } });

                                  Please check if you're still using it. I installed v15.2.19, generated an application, and upgraded it to v19.1.6. The layout is still saved correctly when I use my workaround in v19.1.6. I've attached my test sample ( so that you can review it and test it on your side.

                                • Steve Holt 10.16.2019

                                  Hi Ivan

                                  Wow good memory. Yes that code is in the constructor. I commented out and it still does not work. Now the example you sent me does not save the layout either.

                                • Ivan (DevExpress Support) 10.17.2019

                                  I accidentally did not attach the second project, I've updated my previous comment now. I've also attached a screencast to demonstrate how that sample works on my side. To avoid any misunderstanding, this sample does contain my workaround, and it's still necessary to use it if you generated your application with an old Scaffolding Wizard version.

                                  The sample works in the same way if I remove the PersistentLayoutHelper.ResetLayout method call and inherit IssueCollectionViewModel from InstantFeedbackCollectionViewModel. If you use some other steps to reproduce the issue, please let me know.

                                • Steve Holt 10.17.2019

                                  After further testing I found that the grids that have bands are not saving. I have modified the IssueCollectionView.
                                  Please reset the layout first …


                                • Ivan (DevExpress Support) 10.18.2019

                                  I've reproduced the issue. It occurs when band names are not set. As we mentioned in the Saving and Restoring Layout topic, we use band names to identify them.

                                  Once I set unique names to bands, the issue disappeared in both test projects.

                                  <dxg:GridControlBand x:Name="band1" Header="Details 1" VisibleIndex="0" OverlayHeaderByChildren="False"> <dxg:GridColumn IsSmart="True" FieldName="ID" /> <dxg:GridColumn IsSmart="True" FieldName="IssueType" /> </dxg:GridControlBand> <dxg:GridControlBand x:Name="band2" Header="Details 2" VisibleIndex="0" OverlayHeaderByChildren="False"> <dxg:GridColumn IsSmart="True" FieldName="Subject" /> <dxg:GridColumn IsSmart="True" FieldName="IsUrgent" /> <dxg:GridColumn IsSmart="True" FieldName="CreatedOn" /> </dxg:GridControlBand>

                                  Please try this approach on your side and let me know if it helps.

                                • Steve Holt 10.18.2019

                                  Perfect … that's it …

                                  How would I reset all layouts in an App. I know I can place this on loading:

                                  PersistentLayoutHelper.PersistentLogicalLayout = null; PersistentLayoutHelper.PersistentViewsLayout.Clear();

                                  However I want to be able to clear all the layouts in an App. I did this in version 17.1:

                                  PersistentLayoutHelper.ResetLayout(); App.Current.Shutdown();

                                  This does not worked in version 19. Is there another way to clear all layouts without doing it on load?

                                  thanx for your help

                                • Steve Holt 10.18.2019

                                  I think I have a work around for the layout reset. I believe the reset worked for me in version 17 because I would initiate the reset in a separate navigation frame before it actually loaded all the tile modules. I would assume that the restoring and saving did not go thru this frame navigation.

                                  I have since removed that frame from my app. Now when a reset is done I restrict the saving layout on close that way nothing is saved on close.

                                  But if there is something different let me know ...

                                  thanx again

                                1 Solution

                                Creation Date Importance Sort by

                                When I invoke this code on a button click, it does not work in v17.1 either.

                                PersistentLayoutHelper.ResetLayout(); App.Current.Shutdown();

                                The issue occurs because the root ViewModel (in my case, this is IssueContextViewModel) invokes PersistentLayoutHelper.SaveLayout when the window is closed. We do this in the DocumentsViewModel.OnClosing method and invoke it when the window is closed.

                                <dxmvvm:CurrentWindowService ClosingCommand="{Binding OnClosingCommand}" />

                                You'll need to make sure that you invoke PersistentLayoutHelper.ResetLayout after we save the layout if you want to proceed with this approach.

                                • Steve Holt 10.21.2019

                                  Got it … thank you for your help.