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

TCustomDBGrid.UpdateGridCounts

Gets the total number of visible columns or fields for the grid control.

Declaration

Source position: dbgrids.pas line 511

protected function TCustomDBGrid.UpdateGridCounts: Integer;

Function result

Number of visible columns or fields defined for the grid control.

Description

UpdateGridCounts is an Integer function which gets the total number of visible columns (or fields) in the grid control.

UpdateGridCounts calls GetColumnCount to get the number of entries in the Columns collection. When Columns have been defined, and DataLink is Active, the RecCount and RowCount variables are updated. If Columns is not used, the fields in the linked dataset or checked for the number of visible TField entries.

The UpdateGridColumnSizes method is used to adjust the sizes for the columns. If the linked dataset is Active, and a Row is Selected, the AdjustEditorBounds method is called.


Version 3.2 Generated 2024-02-25 Home