I agree, the script is equivalent to the demo page, but why this does not work?
Also put alert and see if it is lunched (before call expandSubGridRow) . If you have FireBug you can set to use the development version of jqGrid (not min version) and look in expandSubGridRow which is in grid.subgrid.js module.