To reproduce:
- add RadGridView and fill it with data;
- use the following code for saving the layout: string layout;
using (MemoryStream ms = new MemoryStream())
{
radGridView1.SaveLayout(ms);
ms.Position = 0;
byte[] buffer = new byte[ms.Length - 1];
ms.Read(buffer, 0, buffer.Length);
layout = Convert.ToBase64String(buffer);
ms.Close();
}
When you try to load the saved layout, using the following code, DataException is thrown:
using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(layout)))
{
radGridView1.LoadLayout(stream);
}
Workaround: save the layout in xml file