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

# TCustomGrid.AssignTo

Stores properties from the current grid class instance to the specified target.

## Declaration

Source position: grids.pas line 981

`protected procedure TCustomGrid.AssignTo(`
`Dest: TPersistent`
`); override;`

## Arguments

`Dest` |  | Grid instance where value are stored.

## Description

AssignTo is an overridden method used to store values from the current class instance to the persistent object specified in Dest. AssignTo is overridden to provide support for TCustomGrid properties in the object persistence mechanism.

When Dest is a TCustomGrid descendant, the following properties are copied from the current class instance to the target:

Structure

- Columns (When Columns has been Enabled)
- ColCount (When Columns has not been Enabled)
- RowCount
- FixedCols
- FixedRows
- DefaultRowHeight (when it contains a value other than the default)
- DefaultColWidth (when it contains a value other than the default)
- The internal Rows list
- The internal Cols list (when Columns has not been enabled)

Display Settings

- Options
- Color
- FixedColor
- AlternateColor
- Font
- TitleFont

Position and Selection

- TopRow
- LeftCol
- Col
- Row
- Current selection range for the grid

When Dest is not a TCustomGrid descendant, the inherited AssignTo method is called using Dest as an argument.

## See also

TControl.AssignTo |  | Implements assignment of the control to an Action object, or calls the inherited method.