Expand All Subgrids on page load
http://phpgrid.com/example/custom-event-handler/
Here's a working code snippet.
<?php
$gridComplete = <<<GRIDCOMPLETE
function ()
{
rowIds = $("#TABLE_NAME").getDataIDs();
$.each(rowIds, function (index, rowId) {
$("#TABLE_NAME").expandSubGridRow(rowId);
}
}
GRIDCOMPLETE;
$dg->add_event("jqGridLoadComplete", $gridComplete);
$dg -> display();
?>