I am currently using ag-grid to present JSON data. When the values are located within nested objects, I have to utilize a valueGetter from the grid API to map to the appropriate value. The value getter returns a value for each row and the grid matches it to the correct row successfully. However, my dilemma arises when I want each value to act as a hyperlink that triggers a popup window. I have an openPopup() method in place which uses window.open. Unfortunately, it seems that I am constrained to using JavaScript's .link() method, which only accepts a URL string. As a result, I am struggling to figure out how to make the link open in a new window.
Value getter :
function isinValueGetterBox(params) {
if (params.node.group) { return null; }
var isinValueBox = "";
for (var i = 0; i < params.data.security.identifiers.length; i++) {
if (params.data.security.identifiers[i].type === "isin") {
isinValueBox = params.data.security.identifiers[i].value;
}
}
return isinValueBox.link("views/Popup1.html");
}
popup method :
popup1 = function () {
var popup1 = window.open("views/Popup1.html", "_blank",
"height = 400, width = 700");
}