This method sets the data value of a specific field in a specific row of a grid.
This method only works with Rich Display File development where RPG code is used to populate the grid. It does not work with data-bound grids or with grids rendered by Genie.
Parameters:
- rowNum - the row number to set the value in; 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
- value - the value to set in the bound field
Example:
The following expression sets the customer number to 1 in the row that was clicked:
Code Block | ||||
---|---|---|---|---|
| ||||
getObj("Grid1").grid.setDataValue(row, "CUSTID", 1); |