Skip to content

Expand All Subgrids on page load

Use custom event handler for that to happen. 
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();
?>

Feedback and Knowledge Base