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

# TCustomDBGrid.DoSaveColumn

Saves the specified column definition to the specified XML configuration file.

## Declaration

Source position: dbgrids.pas line 439

`protected procedure TCustomDBGrid.DoSaveColumn(`
`sender: TCustomGrid;`
`aColumn: TGridColumn;`
`aColIndex: Integer;`
`aCfg: TXMLConfig;`
`aVersion: Integer;`
`aPath: string`
`); override;`

## Arguments

`sender` |  | Grid control with the column information stored in the method.
`aColumn` |  | TGridColumn instance with the columnn information stored in the method.
`aColIndex` |  | Ordinal position for the column in the Columns collection.
`aCfg` |  | XML configuration file where the column information is stored.
`aVersion` |  | Value for the GRIDFILEVERSION constant used in the implementation.
`aPath` |  | XPATH-like path where the column information is stored in the XML document.

## Description

DoSaveColumn is an overridden method in TCustomDBGrid. It ensures that AColumn is cast to the TColumn type used in the Columns collection, and the FieldName and DisplayFormat properties for the column are written to the XML configuration file. It calls the inherited method to signal the OnSaveColumn event handler (when assigned).

DoSaveColumn is called from the SaveContent method in the TCustomGrid ancestor.

## See also

TCustomDBGrid.Columns |  | Columns provides access to columns defined for the database grid control.
TColumn.FieldName |  | Name of the Field with data for the column.
TColumn.DisplayFormat |  | The format to be used for display in this column.
TCustomGrid.DoSaveColumn |  | Signals the OnSaveColumn event handler for the grid control (when assigned).
TCustomGrid.SaveContent |  | Saves design-time configuration, column and row settings, and data to the specified XML configuration file.