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

TCustomGrid.CheckLimitsWithError

Checks column and row limits for the specified cell, with error trapping.

Declaration

Source position: grids.pas line 999

protected procedure TCustomGrid.CheckLimitsWithError(

  const aCol: Integer;

  const aRow: Integer

);

Arguments

aCol

  

Column number examined in the method.

aRow

  

Row number examined in the method.

Description

CheckLimitsWithError is a procedure used to ensure that the specified cell coordinates are valid values for grid control.

ACol and ARow contain the column and row numbers for a cell in the grid control. CheckLimitsWithError ensures that the values represent a valid, non-fixed cell in the grid control. ACol must contain a value in the range 0..ColCount-1, and cannot be a fixed column in the grid. ARow must contain a value in the range 0..RowCount-1, and cannot be a fixed row in the grid.

CheckLimitsWithError calls IsColumnIndexValid and IsRowIndexValid to determine whether the corresponding values are valid. If either method returns False, an EGridException is raised.

CheckLimits is used when cell coordinates must be constrained to the values that are valid for the control.

CheckLimitsWithError is used in the implementation of methods like SetCol, SetRow, and SetQuickColRow when AllowOutboundEvents is not enabled.

Errors

Raises an EGridException exception with the message in rsGridIndexOutOfRange when a column or row number is out of range for the control.


Version 4.0 Generated 2025-05-03 Home