[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.SaveToFile

Saves grid information to a file with the specified name.

Declaration

Source position: grids.pas line 1343

public procedure TCustomGrid.SaveToFile(

  FileName: string

); virtual;

Arguments

FileName

  

File name where the grid information is stored.

Description

SaveToFile is a method used to store information from a grid control the file name specified in the FileName argument. FileName can include a fully-qualified path to the file. If the file aready exists on the local file system, it is deleted and re-created before writing values.

SaveToFile creates a temporary TXMLConfig instance that is used to write XML values to the specified file, and may include information about the text, layout, cell display settings, grid options, and range selections for the control.

SaveToFile calls the SaveContent method to write the needed values to the XML configuration file. Please note that the SaveOptions property determines the information stored in the method.

Use LoadFromFile to load settings and content from the XML file into the grid control.

See also

TCustomGrid.SaveToStream

  

Saves grid information to the specified stream.

TCustomGrid.SaveContent

  

Saves design-time configuration, column, and row settings to an XML file.

TCustomGrid.SaveOptions

  

Options which control the information saved and loaded for the grid control.

TCustomGrid.LoadFromFile

  

Loads grid data from a file with the specified file name.

TXmlConfig

The latest version of this document can be found at lazarus-ccr.sourceforge.net.