FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / Extensions Class / SaveGrid Method / SaveGrid(C1FlexGridBase,String,FileFormatEnum,FileFlags,Encoding) Method
C1FlexGridBase instance that will be saved.
Name of the file to save, including the path.
File format to use.
Options to use when saving the file.
System.Text.Encoding to use when saving the file.

In This Topic
    SaveGrid(C1FlexGridBase,String,FileFormatEnum,FileFlags,Encoding) Method
    In This Topic
    Saves the grid contents to a file.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub SaveGrid( _
       ByVal grid As C1FlexGridBase, _
       ByVal fileName As String, _
       ByVal format As FileFormatEnum, _
       ByVal flags As FileFlags, _
       ByVal encoding As Encoding _
    ) 

    Parameters

    grid
    C1FlexGridBase instance that will be saved.
    fileName
    Name of the file to save, including the path.
    format
    File format to use.
    flags
    Options to use when saving the file.
    encoding
    System.Text.Encoding to use when saving the file.
    Remarks

    Grids saved to CSV and other text files include data only (no formatting information is saved).

    Grids saved to Excel files include data and formatting information. Images are not saved.

    Grids can also be persisted to Xml format using the WriteXml(String,XmlOptions) and C1FlexGridBase.ReadXml methods.

    See Also