To save the layout of the grid, use the SaveLayout method, which will save the layout in an XML file. This can be done either in the designer or in code.
Complete the following steps to save the layout of the grid:
Add the following code to the Click event of a button to save the layout of the grid:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1TrueDBGrid1.SaveLayout("c:\temp\ComposerLayout.xml") |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1TrueDBGrid1.SaveLayout(@"c:\temp\ComposerLayout.xml"); |
You've learned how to use the SaveLayout method to save the layout in an XML file.