This is a technique for handling parent and child records, similar to a subGrid, but it is not a type of subGrid and it does not use any of the subGrid properties, events or methods.

Again, the Detail grid is a full-feature grid: you can do whatever you want with it in terms of configuration and function.
First, define two grids in your HTML; in our example, Invoice Header and Invoice Detail (the ids used here are not significant, you can call them whatever you want):
<table id="master" class="scroll"></table> <div id="pagermaster" class="scroll" style="text-align:center;"></div> <table id="detail" class="scroll"></table> <div id="pagerdetail" class="scroll" style="text-align:center;"></div>
Then, in the definition of your Master grid, add the following, which says that whenever a row is selected in the Master grid, the Details grid is sychronized.
onSelectRow: function(id) { if(id == null) { id=0; if(jQuery("#details").getRecords()>0) { jQuery("#details").setGridParam({url:"subgrid.php?q=1&id="+id,page:1}).trigger("reloadGrid"); } } else { jQuery("#details").setGridParam(url:"subgrid.php?q=1&id="+id,page:1).trigger("reloadGrid); } }
Notice also how setGridParam is used to set two parameters of the grid at once (the url and the page number) and how triggering the grid reload is chained.
Now these grids can be defined and operated independently while still being co-ordinated.