Skip to main content

TdxSpreadSheetTableView.GetNextColumnWithNonEmptyCell(Integer,Integer,Boolean) Method

Returns the index of the nearest column object that follows or precedes the target cell position.

Declaration

function GetNextColumnWithNonEmptyCell(const ARow: Integer; const AColumn: Integer; const AGoForward: Boolean = True): Integer;

Parameters

Name Type Description
ARow Integer

The target row index.

AColumn Integer

The target column index.

AGoForward Boolean

Optional. Specifies the search direction:

  • If True (default), the function searches the nearest non-empty column with a higher index than the AColumn parameter value.
  • If False, the function searches the nearest non-empty column with a lower index than the AColumn parameter value.

Returns

Type Description
Integer

The index of the nearest column that contains an initialized cell.

  • If the search operation is successful, the function returns the index of the column with at least one initialized cell.
  • If the search operation fails, the function returns 0 (if the AGoForward parameter value is False) or dxSpreadSheetMaxColumnIndex (if AGoForward is True).
See Also