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

TDBGridColumns.Add

Add creates and stores a new item in the collection

Declaration

Source position: dbgrids.pas line 314

public function TDBGridColumns.Add: TColumn;

Function result

TColumn added to the collection

Description

Add creates and stores a new TColumn instance in the collection.

Add uses the Grid property (and the value in its GridStatus property) to determine whether the column is being explicitly added to the collection or added as a result of the automatic columns option in the grid. If the Grid contains the value gsAddingAutoColumns in its GridStatus property exisiting automatic columns are left in the collection. Otherwise, RemoveAutoColumns is called prior to creating and storing the new TColumn instance.

Add calls the inherited Add method to create and store the new TColumn instance.

See also

TCollection.Add

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