Get Subgrid parent row id

Hello,



If I am working with a subgrid, is there a way to get the parent row id without having the user select the parent row “first”. Meaning, sometimes user simply clicks on the “plus” symbol to get to subgrid and does not select row first. So I cannot just use parentGrid.getSelectedRowId().



Thanks,

Michael

You can use onSubGridCreated event. onSubGridCreated event occurs when the creation of a sub-grid was initiated. Event passes following parameters:
sub_grid_obj - sub-grid object;
rId - id of the related row;
rInd - index of the related row.
grid.attachEvent(“onSubGridCreated”, function(sub_grid_obj,rId,rInd){});