ComponentOne FlexPivot for WinForms
C1.Win.C1FlexGrid.4.8 Assembly / C1.Win.C1FlexGrid Namespace / C1FlexGrid Class / WriteXml Method / WriteXml(String,XmlOptions) Method
Name of the file to save, including the path.
Options that allows to choose which elements of FlexGrid should be saved

In This Topic
    WriteXml(String,XmlOptions) Method
    In This Topic
    Saves the grid contents to an Xml document.
    Syntax
    'Declaration
     
    Public Overloads Sub WriteXml( _
       ByVal fileName As String, _
       Optional ByVal options As XmlOptions _
    ) 
    public void WriteXml( 
       string fileName,
       XmlOptions options
    )

    Parameters

    fileName
    Name of the file to save, including the path.
    options
    Options that allows to choose which elements of FlexGrid should be saved
    Remarks

    The grid serializes all its contents into the Xml document, including the data stored in the cells, row and column properties, styles, images, etc.

    Objects of custom types stored in the grid are also serialized as long as they have an associated System.ComponentModel.TypeConverter that provides conversions to and from string.

    The C1FlexGridBase.WriteXml method has several overloads that allow you to save several grids into a single Xml document, along with other information stored in the Xml document.

    Example
    The code below saves a grid into an Xml file: The code below saves two grids into an Xml file, then reads them back in reverse order:
    See Also