Black Friday Sale!
Save up to 50% off any plans! Valid from 23 Nov to 30 Nov - Also valid for the existing customers
Open Closed

row grouping with summary row #8485


0
sophoana created

Hello support,

Row groups with summary rows does not exist in primeng table. How can i create a table using row grouping with summary row(total) in primeng table.

I am use Angular 7 with ASP.net Core

Thanks.


1 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi,

    If you can find lastIndex of an item in rowGroup body, you can include another tr. What I mean is something like this;

    <ng-template pTemplate="body" let-rowData let-rowIndex="rowIndex">
    	<tr class="ui-widget-header" *ngIf="rowGroupMetadata[rowData.brand].index === rowIndex">
    		<td colspan="3">
    			<span style="font-weight:bold">{{rowData.brand}}</span>
    		</td>
    	</tr>
    	<tr>
    		<td>{{rowData.vin}}</td>
    		<td>{{rowData.year}}</td>
    		<td>{{rowData.color}}</td>
    	</tr>
    	<tr *ngIf="{LAST_ROW_CHECK_CONDITION}">
    		<td colspan="3">{{rowData.vin}}</td>
    	</tr>
    </ng-template>