Page tree
Skip to end of metadata
Go to start of metadata

This method returns the data value of a specified field in a specified row of a grid. In the event that the field name or row number does not exist, null is returned.

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


For 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 - field name, as defined in the subfile record format

Returns

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

Example

Retrieve the Customer ID from the First Row of the Subfile
var customerId = getObj("Grid1").grid.getDataValue(1, "CUSTID");
  • No labels