Is there an easy way to save and load a layout directly from a database field, i.e. an Oracle clob field assigned to a string field, without having to save it to disk. I could also use a blob field and an array, but since it's just a xml file a clob would be better.
1 Answer, 1 is accepted
Dess | Tech Support Engineer, Principal
answered on 15 May 2014, 02:53 PM
Thank you for writing.
Save/Load layout functionality gives your applications the opportunity to preserve user grid settings such as column order and restore them later. Those layout settings are written in a xml file. You can use one of the three overloads of the SaveLayout method in order to store the xml content into a file, a stream or a XmlWriter. Here is a sample code snippet, demonstrating how easy you can store the grid layout into a string and afterwards it is possible to store this string content into the database. The load layout functionality will include loading this string into a MemoryStream and then using this MemoryStream for the RadGridView.LoadLayout method:
MemoryStream contentStream = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(layout));
I hope this information helps. Should you have further questions, I would be glad to help.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.