I'm trying to add excel export functionality to Kendo UI angular 2 grid, but getting an error while the angular 2 app loads:
Can't bind to 'toolbar' since it isn't a known property of 'kendo-grid'.
Here is the code snippet I'm using:
<kendo-grid [data]="gridView" [height]="700" [pageSize]="pageSize"
[toolbar]="['excel']"
[excel]="{fileName: 'Reprocessingdetails.xlsx'}"
[skip]="skip"
[pageable]="{
info: true,
type: 'input',
pageSizes: false,
previousNext: true
}"
[scrollable]="'none'"
(pageChange)="pageChange($event)"
[sortable]="{ mode: 'single', allowUnsort: true }"
[sort]="sort"
(sortChange)="reprocessingResultsSortChange($event)"
>
<kendo-grid-column field="isSelected" title="Select">
<template kendoCellTemplate let-dataItem>
<input type="checkbox" [(ngModel)]="dataItem.isSelected" />
</template>
</kendo-grid-column>
<kendo-grid-column field="reprocessingType" title="Reprocessing Type">
</kendo-grid-column>
</kendo-grid>
Excel export functionality wasn't mentioned in the roadmap, so is it fair to assume it is already present? If so, how do I make the above snippet work? any help?
Currently, the Kendo UI Grid for Angular 2 does not support Excel export. The toolbar is set via
ToolbarComponent
, which currently projects the content usingng-content
. You can see all this in the docsExcel Export is now an official feature of the Kendo UI Grid. It can also be used on its own, as a non-visual component for generating XLSX files.
Excel export feature has been added (use the kendoGridExcelCommand) and an example can be seen here.