toolbarClick(args) {
switch (args.item.text) {
case 'PDF Export':
this.gridInstance.pdfExport();
break;
case 'Excel Export':
this.gridInstance.excelExport();
break;
}
}
render() {
return (<div className='control-pane'>
<div className='control-section'>
<GridComponent dataSource={orderDetails} ref={grid => this.gridInstance = grid} toolbar={this.toolbarOptions} allowPaging={true} allowExcelExport={true} allowPdfExport={true} toolbarClick={this.toolbarClick.bind(this)} >
. . .
. . . .
<Inject services={[Page, Toolbar, ExcelExport, PdfExport, Group]} />
</GridComponent>
</div>
</div>);
} |