[App.component.ts]
. . .
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
providers: [ToolbarService, PageService, ExcelExportService, PdfExportService, GroupService]
})
export class AppComponent {
public data: Object[];
public toolbar: string[];
public pageSettings: Object;
public aggreagtes: Object;
@ViewChild('grid', {static: true})
public grid: GridComponent;
public ngOnInit(): void {
this.data = orderDetails;
this.toolbar = ['ExcelExport', 'PdfExport', 'CsvExport'];
this.pageSettings = { pageCount: 5 };
this.aggreagtes = [{
columns: [{
type: 'Sum',
field: 'Freight',
format: 'N2',
footerTemplate: 'Sum: ${Sum}'
}]
}];
}
excelQueryCellInfo(args) {
// applying the color and border color for
args.style = {borders: { color: '#9c4b4b' }, fontColor: '#9c4b4b' };
}
. . .
} |