Skip to content

RowValue - cCJGridColumn

Returns the column value for the passed row

Type: Function
Return Data Type: String

Parameters

Parameter Type Description
iRow Integer The datasource row to get the value from

Syntax

Function RowValue Integer iRow Returns String

Call Example

Get RowValue iRow to StringVariable

Description

RowValue is used to get the column value for any row in the datasource. The iRow value passed must exist in the datasource. This will be used most often with static grids where all data is loaded. It can be used with dynamic grids, but the row must be currently loaded in the datasource.

//  Set color of cell based on data in a different column
Procedure OnSetDisplayMetrics Handle hoGridItemMetrics Integer iRow String sValue
    String sType

    Get RowValue of oType iRow to sType
    If (Uppercase(sType)="DATETIME") Begin
        Set ComForeColor of hoGridItemMetrics to clDkGray
    End
End_Procedure
Function BuildToolTip Integer iRow Returns String
    String sNum sName sEmail sCr

    Get RowValue of oNumCol iRow to sNum
    Get RowValue of oNameCol iRow to sName
    Get RowValue of oEmail iRow to sEmail
    Move (Character(13)) to sCr
    Move (sNum + sCr + sName + sCr +  sEmail) to sText
    Function_Return sText
End_Function

You can use SelectedRowValue to get the column value of the SelectedRow. You can use UpdateCurrentValue to change a SelectedRow's column value. If you need to change the value of a column in a non-selected row, you should interact directly with the datasource.

Return Value

The column value for iRow.