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

TGridColumns.RealIndex

The actual grid index for the visible columns in the collection.

Declaration

Source position: grids.pas line 664

public function TGridColumns.RealIndex(

  Index: Integer

):Integer;

Arguments

Index

  

Position for the visible column requested in the method.

Function result

Ordinal position in the column for the specified visible column number, or -1 when not a valid position in the collection.

Description

RealIndex is an Integer function used to get the ordinal position in the collection for the visible column specified in Index. It is provided to maintain compatibility with older versions of the LCL, where Items was used to access column instances with their visible property set to True. Current LCL version do not have this limitation; they access the collection directly.

The return value is set to the value in the Index argument when it is a value position in the collection. Otherwise, the return value is set to -1.

RealIndex is called from the ColumnIndexFromGridColumn method in TCustomGrid when its Columns collection has been enabled.

See also

TGridColumns.Enabled

  

Indicates if the column collection is enabled.

TGridColumns.Items

  

Provides indexed access to column definitions in the collection.

TGridColumns.VisibleIndex

  

The visible index value for the specified column in the collection.

TGridColumns.VisibleCount

  

The number of visible columns in the collection.

TCustomGrid.Columns

  

Definitions for the columns displayed the grid.

TCustomGrid.ColumnIndexFromGridColumn

  

Gets the position of the specified column relative to the first column in the grid.


Version 4.0 Generated 2025-05-03 Home