Im new to Yii2.0 and I have a problem figuring out how to display a subtotal row in Gridview. I hope somebody can help me. I know there is this renderRowTable but I do not know how to use it. can somebody help me by providing some sample code?
Attached is the end result of the screen that i want to do.
'extraRowTotalsValue' => function($data, $row, &$totals) {
/* this is example function make yours subtotal attribute...*/
if(!isset($totals['sum_credit'])) $totals['sum_credit'] = 0;
$totals['sum_credit'] += $data['relSubject']['credits'];
},
after configure Grid view extra row setting as per your requirements…