[index.html]
<script id="columnTemplate" type="text/template">
<span>{{:Freight + ID }}</span>
</script>
[app.component.ts]
export class AppComponent {
public groupSettings = { groupedColumns: ["Order"] }; //set grouping for column 1
public summaryRows = [{
summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}", prefix: "Sum = " },
{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "ID", dataMember: "ID", prefix: "Sum = " },
//set summary value for column 3 and 4
}];
public columnTemplate = "#columnTemplate"; //assign template for the column
...
@ViewChild('grid') Grid: EJComponents<any, any>;
[app.component.html]
<ej-grid #grid [dataSource]="gridData" [allowPaging]="true" [allowGrouping]="true" [showSummary]="true" [groupSettings]="groupSettings" [summaryRows]="summaryRows">
<e-columns>
...
<e-column field="ID" headerText="ID" width="75" textAlign="right"></e-column>
<e-column field="Freight" headerText="Freight" width="75" format="{0:C}" textAlign="right"></e-column>
<e-column field="Sum" headerText="Sum" width="75"[template]="columnTemplate" textAlign="right"></e-column>
</e-columns>
</ej-grid> |
http://www.syncfusion.com/downloads/support/forum/132702/ze/ejGrid_exporting-1609824946
cannot view this link. It's blocked. how are we suppose to view the example? Thank you.