Nested grid using sub_row_grid

i used the column type ‘sub_row_grid’ for one of the column in my grid and was able to populate the results in the parent grid. A little plus icon appears in this column, when I expand the column the child grid is loaded perfectly. I have used the event ‘onSubGridCreated’ to populate the child grid.
when I use the parentGrid.cells(i,j).getSubGrid I get the below error -
“TypeError: parentGrid.cells(…).getSubgrid is not a function”
I made sure I have imported the right .js files (dhtmlx.js and also dhtmlxgrid_excell_sub_row.js)

NOTE: I used return false in the ‘onSubGridCreated’ implementation to prevent the default behavior.

I am not sure why this happens and unable to get rid of this error. Please suggest what needs to be done. I really appreciate your reply.

I was able to figure this out. I passed the incorrect co-ordinates to get the subgrid object. It worked when I passed the right co-ordinates.