getPrimaryKeysForRow(row)
JavaScript API Reference/Ab.grid.ReportGrid object
getPrimaryKeysForRow(row)
Returns a JS object containing primary key values for the specified grid row.
Returns: JS object containing primary key names and values, i.e.
{name_1: value_1, name_2: value_2, ...}
Parameters:
-
row
(JS object): grid row data object.
Example:
Get the primary keys of the row that the user has clicked on:
// in the AXVW file
<field controlType="button" onclick="showDetails">
// in JS file
function showDetails() {
var row = this;
var primaryKeys = this.grid.getPrimaryKeysForRow(row);
alert(toJSON(primaryKeys));
}