Sign in Join
FPDoc Onlineexperiment

TCustomGrid.LoadFromFile procedure

Member of TCustomGridpublicIn unit Grids

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

Declaration

pascal
procedure LoadFromFile(FileName: string); virtual

Arguments

FileName

Name of the file with the content loaded in the method.

Description

FileName contains name of the file with the content loaded in the method, and may included a fully qualified path. An Exception is raised with the message in rsGridFileDoesNotExist if a file with the specified path and name is not found.

LoadFromFile creates a temporary TXMLConfig instance that is used load the content from the specified file. The private LoadSub method is called using the configuration file instance to read the content in the file, and may raise an exception if the XML content does not have a valid version element.

LoadFromFile reverses the actions performed in the SaveToFile method. Please note that the SaveOptions property determines the information available to be loaded from the file.

Use LoadFromStream to read the content in the grid from a TStream instance.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.