Here’s a tip for working with the PHP DataGrid.
If you need to put a totals line in your footer, which will be locked at the bottom (rather than sorting), you can do the following:
1. you’ll build one query to get the result rows
2. build a separate query to get the total row
3. after your php to set up the datagrid you’ll have something like the following:
$datagrid = buildDataGrid($regions, 'regions');
...
$datagrid->addColumn(new Structures_DataGrid_Column('Sales Office', 'sales_office', 'sales_office', array('width'=>'175'), null));
...
$footerArr = array(
'content' => array(
'Total',
$regTotals[0]['active'],
$regTotals[0]['pending'],
$regTotals[0]['closed'],
$regTotals[0]['total'],
$regTotals[0]['total_orders'],
renderCurrency(array('record'=>$regTotals[0],'fieldName'=>'amount'))
),
'attribs' => array(
'style="font-weight:bold;"')
);
renderTable($datagrid,null,$footerArr);


