Skip to main content

How to: Save a control's layout to a XML file

The following sample code demonstrates how to save and load a grid view’s layout at runtime.

string fileName = "gridlayout.xml";
gridView1.SaveLayoutToXml(fileName);
// ...
gridView1.RestoreLayoutFromXml(fileName);