BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[App.component.html]
<div class="control-section">
<ejs-grid #grid [dataSource]='data' allowPaging='true' height=375 [pageSettings]='pageSettings' [aggregates]='aggreagtes' [toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'
[allowExcelExport]='true' [allowPdfExport]='true'>
. . .
</ejs-grid>
</div>
|
[App.component.ts]
. . .
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}'
}]
}];
}
}
} |
[App.component.html]
<div class="control-section">
<ejs-grid #grid [dataSource]='data' allowPaging='true' (excelQueryCellInfo)="excelQueryCellInfo($event)" height=375 [pageSettings]='pageSettings' [aggregates]='aggreagtes' [toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'
[allowExcelExport]='true' [allowPdfExport]='true'>
. . .
</ejs-grid>
</div>
|
[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' };
}
. . .
} |