Skip to content

Remove Duplicate Values in Group Summary

When using group summary methods to set both group property and summary for the same column, it is recommend to use a simple CSS "hack" hide the duplicate values in summary row. 

The following example, I have the table name "payments", and the column name "amount".


<?php
$dg = new C_DataGrid("SELECT * FROM payments", "customerNumber", "payments");
              
$dg->set_group_properties('amount');
$dg->set_group_summary('amount','sum');

$dg -> display();
?>

<style> 
 tr[jqfootlevel="0"]  td[aria-describedby=payments_amount]{
       color:transparent;
    }
</style> 

Remember to change "payments_amount" to reflect your own table name and column name. Add the CSS style it at the end of the page BEFORE ending body tag. 

Feedback and Knowledge Base