This is a migrated thread and some comments may be shown as answers.

Restore default settings for persisted GridView

2 Answers 135 Views
PersistenceFramework
This is a migrated thread and some comments may be shown as answers.
ux
Top achievements
Rank 1
ux asked on 08 May 2018, 08:51 PM

Hello team,

I am persisting the grid settings. And I have a button in each gridview's control panel as "Reset to default".

I am deleting the related bin file, but the default settings (as stated in xaml) is not being reflected to current grid in screen. I tried, rebinding/re assigning itemssource/InvalidateVisual with no luck. How can i reset the gridview settings, without being have to keep a default bin file and restoring that bin file, when the user clicks "reset to default".

2 Answers, 1 is accepted

Sort by
0
ux
Top achievements
Rank 1
answered on 09 May 2018, 09:10 AM
No matter how hard I try, I could not refresh the grid after deleting the related bin file. So I cannot make the grid to revert to default.
0
Martin Ivanov
Telerik team
answered on 11 May 2018, 09:51 AM
Hello,

Deleteing the file with the persistence framework settings won't revert the gridview default settings on itself. Instead, you will need to reset them manually (setting properties manually) or load some default settings from the bin file.

 Can you send me some runnable code snippets that show how you implemented the saving loading and resetting the settings? This will help me to better understand your case and see if I could suggest a suitable approach for this.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PersistenceFramework
Asked by
ux
Top achievements
Rank 1
Answers by
ux
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or