selectRow( row, append )
Select the specified row. Other rows may be deselected depending on selection mode (single vs. multiple) and the 2nd parameter, append.
Parameters:
row - The relative record number of the row to check.Ā This number should match the RRN used in your RPG program when the row was written. If row is out of bounds, or if record is already selected, then the call does nothing.
append - When true, other rows are not deselected when multiple-selection is allowed. When false, others are deselected if multiple-selection is allowed. If single-selection is true, other selected records are deselected regardless of argument.
Example:
var rrn = 7;
var grid = getObj("Grid1").grid;
grid.selectRow(rrn);
grid.isRowSelected(rrn); // returns true.
grid.getSelectedRows(); // returns [7].
grid.selectRow(1, true); //Append selection.
grid.isRowSelected(rrn); // returns true.
grid.isRowSelected(1); // returns true.
grid.getSelectedRows(); // returns [1,7].
grid.selectRow(1);
grid.isRowSelected(rrn); // returns false.
grid.isRowSelected(1); // returns true.
grid.getSelectedRows(); // returns [1].
This API method is available with Profound UI releases later than Version 6 Fix Pack 1.2.