ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Saving the Layout of the Grid

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.

In the Designer

1.   Open the TrueDBGrid Designer. For information on how to access the TrueDBGrid Designer, see Accessing the TrueDBGrid Designer.

2.   In the designer, click Save Layout on the toolbar to open the Save As dialog box.

3.   Browse to a location and enter a file name in the File Name box.

4.   Click Save to save the layout as an XML file.

5.   Click OK to close the designer.

In Code

Add the following code to the Click event of a button to save the layout of the grid:

·      Visual Basic

Me.C1TrueDBGrid1.SaveLayout("c:\temp\ComposerLayout.xml")

·      C#

this.c1TrueDBGrid1.SaveLayout(@"c:\temp\ComposerLayout.xml");

·      Delphi

Self.C1TrueDBGrid1.SaveLayout('c:\temp\ComposerLayout.xml');


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.