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

# TCustomGrid.LoadContent

Loads values for the grid control from the specified XML configuration file.

## Declaration

Source position: grids.pas line 1147

`protected procedure TCustomGrid.LoadContent(`
`cfg: TXMLConfig;`
`Version: Integer`
`); virtual;`

## Arguments

`cfg` |  | Configuration file with values loaded in the method.
`Version` |  | LCL Grid version number for the values processed in the method.

## Description

LoadContent is a method used to load content from the XML configuration file specified in cfg into the grid control.

Design-time settings for the grid control are loaded from the XML file when soDesign is included in the SaveOptions property and the XML file includes the corresponding values.

Property values loaded in the method include:

- Color
- ColCount
- RowCount
- FixedCols
- FixedRows
- DefaultRowHeight
- DefaultColWidth
- ColWidths
- RowHeights
- Columns

The LoadGridOptions method is called to load values for the Options and Options2 properties.

The columns and rows visible in the grid control are loaded and restored when they are included in the XML file. This includes the range selection rectangle in RangeSelect when enabled in the Options for the control.

Remark: | In TCustomGrid, LoadContent does not load the cell values for the control. That process is implemented in descendent classes which handle the data type(s) supported in the implementation.

## See also

TCustomStringGrid.LoadContent |  | Loads configuration settings from the specified XML configuration file.