I have a Grid and a SubGrid. When the user clicks on the row in Grid to expand the SubGrid, I have a link in one of the columns of the SubGrid. In the url of this link in the SubGrid, I want access to the ID of the row from the parent id. Is this doable?
Below is how I’m creating a link at each row of the sub grid. This was taken by an answer from Oleg
loadComplete: function() {
var ids = jQuery('#'+subgridTableId).getDataIDs();
var myGridNode = jQuery('#'+subgridTableId)[0];
for (var i = 0, idCount = ids.length; i < idCount; i++) {
var a = $("#"+ids[i]+" a",myGridNode);
a.html("Link Name");
a.click(function(e) {
var hash=e.currentTarget.hash;
if (hash.substring(0,5) === '#?id=') {//do something }
}
}
}
So, my question is whether there is a way in jqGrid to access the id of the parent row in the subgrid inside the loadComplete function?
Something like this?