Column Grouping Default theme
simple column grouping,summation of a column value, inline editing
HIDE CODE
<?php
$xcrud = Xcrud::get_instance();
$xcrud->table('payments');
$xcrud->unset_remove();
$xcrud->column_hide('customerNumber');
$xcrud->group_by_columns('customerNumber');//Allows only one field
$xcrud->group_sum_columns('amount');//Allows only one field
$xcrud->columns('customerNumber,checkNumber,amount');
$xcrud->fields_inline('customerNumber,checkNumber,paymentDate,amount');
echo $xcrud->render();
?>
Payments
| # | Checknumber | Amount | |
|---|---|---|---|
| - Customernumber: 157 (1 items) | |||
| 1 | 61-8861___12 | 35152.1 | View Edit |
| total | 35152.1 | ||
| - Customernumber: 161 (4 items) | |||
| 2 | BR352384 | 5500 | View Edit |
| 3 | BR478494 | 50743.65 | View Edit |
| 4 | KG644125 | 12692.19 | View Edit |
| 5 | NI908214 | 38675.13 | View Edit |
| total | 107610.97 | ||
| - Customernumber: 167 (2 items) | |||
| 6 | ED743615 | 12538.01 | View Edit |
| 7 | GN228846 | 85024.46 | View Edit |
| total | 97562.47 | ||
| - Customernumber: 171 (2 items) | |||
| 8 | GB878038 | 18997.89 | View Edit |
| 9 | IL104425 | 42783.81 | View Edit |
| total | 61781.7 | ||
| - Customernumber: 172 (1 items) | |||
| 10 | AD832091 | 1960.8 | View Edit |
| total | 1960.8 | ||