Update:
Due to the way that the allChildrenWidgets() method works, it was necessary to add a bit of code to retrieve the correct item from the array.
$("#gridContracts").on("ighierarchicalgridrowexpanding", function (evt, ui)
{
var parentRow = ui.parentrow;
var parentRowId = parentRow.attr("data-id");
var simId = $("#gridContracts").igGrid("getCellValue", parentRowId, "Simulation_id");
// get primary key value from parent row
var pk = $("#gridContracts").igGrid("getCellValue", parentRowId, "Contract_id");
var childGrids = ui.owner.allChildrenWidgets();
// loop thru array of allChildrenWidgets()
for (var i = 0; i < childGrids.length; i++)
{
// compare pk to fk of first row in each grid item
if (childGrids[i].getCellValue(childGrids[i].rows(0).attr("data-id"), "Contract_id") == pk)
{
childGrids[i].setColumnTemplate(childGrids[i].options.columns[0].key, "<a href=\"targetpage.aspx?s_id=" + sim_Id + "&v_id=${Version_id}\" target=\"_self\">Details</a>", true);
break;
}
}
});