ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.SaveLayout Method (Stream, Boolean)

Saves the grid's layout.

[Visual Basic]

Overloads Public Sub SaveLayout( _

ByVal stream As Stream, _

ByVal withDefaultValues As Boolean _

)

[C#]

public void SaveLayout(

Stream stream,

bool withDefaultValues

);

[Delphi]

public procedure SaveLayout(

stream: Stream;

withDefaultValues: Boolean

); overload;

Parameters

stream

The Stream to contain the grid layout.

withDefaultValues

Specifies whether default values are serialized.

Example

The following code provides an example of the SaveLayout method saving all properties settings:

·      Visual Basic

       Dim stm As New System.IO.FileStream("c:\temp\composers.xml", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite)

       Me.C1TrueDBGrid1.SaveLayout(stm, True)

·      C#

       System.IO.FileStream stm = new System.IO.FileStream(@"c:\temp\composers.xml", System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite);

       this.c1TrueDBGrid1.SaveLayout(stm, true);

·      Delphi

       var stm : System.IO.FileStream;

       stm := System.IO.FileStream.Create('c:\temp\composers.xml', System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite);

       Self.C1TrueDBGrid1.SaveLayout(stm, True);

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.SaveLayout Overload List


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