Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This method returns the data value of a specific field specified field in a specific specified row of a grid. The data does not have to be visible when this method is called. If the In the event that the field name or row number does not exist, null is returned.

Tip

The data does not need to be visible (on screen) when calling this method. 


Note
titleFor RPG Populated Grids Only
This method only works

...

when used where an RPG program is used to populate the grid in Rich Display Files. It does not work with

...

database-

...

driven grids or with Genie generated grids

...

. In the case of database-driven and Genie generated grids, the getCellValue() API would instead be used.

Parameters

  • row - the row number to retrieve the value from; when using events such as onrowclick, onrowdblclick, onrowmouseover, and onrowmouseout, the row variable is automatically passed into the event and can be used as the parameter to this method
  • fieldName - the field name, as defined in the subfile record format

Example:

The following expression retrieves the customer id from the first row of the subfile:

...

Returns

  • field value, if specified field is found on specified row. 
  • null, if specified field is not found on specified row.

Example

Code Block
languagejs
titleRetrieve the Customer ID from the First Row of the Subfile
var customerId = getObj("Grid1").grid.getDataValue(1, "CUSTID");

...