Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Jun 22, 2009 08:46
open dhtmlx forum
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
Answer posted by dhxSupport on Jun 22, 2009 08:59
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){});