The DevExpress products have always provided good support for persisting users’ preferences. My DevExpress experience spans from early Delphi versions to present .Net versions, and I’ve seen options for persisting settings to the Windows Registry, to XML, and others.
I’m now using the Silverlight DXGrid (2011 vol. 1), and it seems natural to store the user’s customized grid settings in Isolated Storage, so it remains between sessions. What’s the best way to achieve this? Is there a built-in way? And if I have to do it myself, is there at least an object that represents the settings I can serialize, or will I have to write my own serialization scheme?
I looked through the documentation for the GridControl and TableView classes, and found no built-in way to achieve this (like a WriteSettingsToIsolatedStorage() method).
With some help from DevExpress’s support staff, I found this article describing how to do what I wanted.
I took it to the next level with the Extension Methods below, that use the grid’s name to save and restore its layout. I can make the calls I wanted:
Here’s the code: