Skip to content

Commit 4e10a4a

Browse files
author
pipeline
committed
sample(EJ2-5580): Updated the Grid exporting sample as per management review.
1 parent 21aa970 commit 4e10a4a

13 files changed

+14
-14
lines changed

src/grid/advance-exporting-plnkr.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/grid/advanced-exporting-plnkr.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

src/grid/advance-exporting.component.ts renamed to src/grid/advanced-exporting.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { ClickEventArgs } from '@syncfusion/ej2-navigations'
55

66
@Component({
77
selector: 'control-content',
8-
templateUrl: 'advance-exporting.html',
8+
templateUrl: 'advanced-exporting.html',
99
providers: [ToolbarService, ExcelExportService, PdfExportService]
1010

1111
})
12-
export class AdvanceExportingComponent implements OnInit {
12+
export class AdvancedExportingComponent implements OnInit {
1313
public firstGridData: Object[];
1414
public secondGridData: Object[];
1515
public toolbar: string[];
File renamed without changes.

src/grid/default-exporting-plnkr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"common/shared.module":"import { NgModule } from '@angular/core';\nimport { ButtonModule } from '@syncfusion/ej2-ng-buttons';\nimport { ListViewModule } from '@syncfusion/ej2-ng-lists';\nimport { DropDownListModule } from '@syncfusion/ej2-ng-dropdowns';\nimport { TreeViewModule, TabModule } from '@syncfusion/ej2-ng-navigations';\n\n\n\n@NgModule({\n imports: [\n ButtonModule,\n ListViewModule,\n DropDownListModule,\n TreeViewModule,\n TabModule\n\n ],\n \n exports: [\n ButtonModule,\n TreeViewModule,\n ListViewModule,\n DropDownListModule,\n TabModule\n ]\n})\nexport class SharedModule { }","app.module":"import { ExportingComponent } from './default-exporting.component';\n\n\n\nimport { HttpModule, JsonpModule } from '@angular/http';\nimport { BrowserModule } from '@angular/platform-browser';\nimport 'rxjs/add/operator/map';\nimport { NgModule, Type, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { HttpModule } from '@angular/http';\nimport { GridAllModule } from '@syncfusion/ej2-ng-grids';\nimport { NumericTextBoxAllModule } from '@syncfusion/ej2-ng-inputs';\nimport { ToolbarModule } from '@syncfusion/ej2-ng-navigations';\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { SharedModule } from './common/shared.module';\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@NgModule({\n imports: [CommonModule, HttpModule, ToolbarModule, GridAllModule, SharedModule, NumericTextBoxAllModule, HttpModule, JsonpModule, BrowserModule],\ndeclarations: [ExportingComponent],\nbootstrap: [ExportingComponent]\n})\nexport class AppModule { }","default-exporting.component":"import { Component, OnInit, ViewChild, ValueProvider } from '@angular/core';\nimport { orderDatas } from './data';\nimport {\n GridComponent, ToolbarService, PageService, ExcelExportService, PdfExportService,\n GroupService\n} from '@syncfusion/ej2-ng-grids';\nimport { ClickEventArgs } from '@syncfusion/ej2-navigations'\n\n@Component({\n selector: 'control-content',\n templateUrl: 'default-exporting.html',\n\n\n})\nexport class ExportingComponent implements OnInit {\n public data: Object[];\n public toolbar: string[];\n public pageSettings: Object;\n public groupOptions: { [x: string]: Object } = { showDropArea: false, columns: ['ShipCountry'] };\n @ViewChild('grid')\n public grid: GridComponent;\n\n public ngOnInit(): void {\n this.data = orderDatas;\n this.toolbar = ['excelexport', 'pdfexport', 'csvexport'];\n this.pageSettings = { pageCount: 5 };\n }\n toolbarClick(args: ClickEventArgs): void {\n switch (args.item.text) {\n case 'PDF Export':\n this.grid.pdfExport();\n break;\n case 'Excel Export':\n this.grid.excelExport();\n break;\n case 'CSV Export':\n this.grid.csvExport();\n break;\n }\n }\n}\n\n\n\n","default-exporting.html":"<div class=\"control-section\">\n <ej-grid #grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'\n [allowExcelExport]='true' [allowPdfExport]='true' [allowGrouping]=\"true\" [groupSettings]=\"groupOptions\">\n <e-columns>\n <e-column field='OrderID' headerText='Order ID' width='120' textAlign=\"right\" isPrimaryKey='true'></e-column>\n <e-column field='CustomerID' headerText='Customer ID' width='120'></e-column>\n <e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign=\"right\"></e-column>\n <e-column field='ShipName' headerText='Ship Name' width='170'></e-column>\n <e-column field='ShipCountry' headerText='Ship Country' width='150'></e-column>\n </e-columns>\n </ej-grid>\n</div>","index.html":"<!DOCTYPE html>\n<html>\n \n <head>\n <meta name=\"author\" content=\"Syncfusion\" />\n <link href=\"http://npmci.syncfusion.com/packages/production/material.css\" rel=\"stylesheet\" />\n <script src=\"https://unpkg.com/core-js/client/shim.min.js\"></script>\n <link href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\" />\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.min.js\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.6.25/zone.min.js\"></script>\n <script src=\"https://unpkg.com/[email protected]\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n </head>\n \n <body>\n <control-content>\n <div id='loader'>Loading...</div>\n </control-content>\n </body>\n \n </html>\n ","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://npmci.syncfusion.com/packages/production/\",\n \"angular:\": \"https://unpkg.com/@angular/\"\n },\n map: {\n main: 'main.ts',\n typescript: \"https://unpkg.com/[email protected]/lib/typescript.js\",\n \"plugin-json\":\"https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js\",\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-dropdowns\": \"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\",\n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\",\n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\",\n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\",\n \"@syncfusion/ej2-lineargauge\": \"syncfusion:ej2-lineargauge/dist/ej2-lineargauge.umd.min.js\",\n \"@syncfusion/ej2-pdf-export\": \"syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js\",\n \"@syncfusion/ej2-compression\": \"syncfusion:ej2-compression/dist/ej2-compression.umd.min.js\",\n \"@syncfusion/ej2-excel-export\": \"syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js\", \n \"@syncfusion/ej2-file-utils\": \"syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js\",\n \n \"@syncfusion/ej2-ng-base\": \"syncfusion:ej2-ng-base/dist/ej2-ng-base.umd.min.js\",\n \"@syncfusion/ej2-ng-buttons\": \"syncfusion:ej2-ng-buttons/dist/ej2-ng-buttons.umd.min.js\",\n \"@syncfusion/ej2-ng-calendars\": \"syncfusion:ej2-ng-calendars/dist/ej2-ng-calendars.umd.min.js\",\n \"@syncfusion/ej2-ng-charts\": \"syncfusion:ej2-ng-charts/dist/ej2-ng-charts.umd.min.js\",\n \"@syncfusion/ej2-ng-circulargauge\": \"syncfusion:ej2-ng-circulargauge/dist/ej2-ng-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-ng-data\": \"syncfusion:ej2-ng-data/dist/ej2-ng-data.umd.min.js\",\n \"@syncfusion/ej2-ng-dropdowns\": \"syncfusion:ej2-ng-dropdowns/dist/ej2-ng-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-ng-grids\": \"syncfusion:ej2-ng-grids/dist/ej2-ng-grids.umd.min.js\",\n \"@syncfusion/ej2-ng-inputs\": \"syncfusion:ej2-ng-inputs/dist/ej2-ng-inputs.umd.min.js\",\n \"@syncfusion/ej2-ng-lists\": \"syncfusion:ej2-ng-lists/dist/ej2-ng-lists.umd.min.js\",\n \"@syncfusion/ej2-ng-navigations\": \"syncfusion:ej2-ng-navigations/dist/ej2-ng-navigations.umd.min.js\",\n \"@syncfusion/ej2-ng-popups\": \"syncfusion:ej2-ng-popups/dist/ej2-ng-popups.umd.min.js\",\n \"@syncfusion/ej2-ng-lineargauge\": \"syncfusion:ej2-ng-lineargauge/dist/ej2-ng-lineargauge.umd.min.js\",\n\n '@angular/core': 'angular:core/bundles/core.umd.js',\n '@angular/common': 'angular:common/bundles/common.umd.js',\n '@angular/compiler': 'angular:compiler/bundles/compiler.umd.js',\n '@angular/http': 'angular:http/bundles/http.umd.js',\n '@angular/forms': 'angular:forms/bundles/forms.umd.js',\n '@angular/router': 'angular:router/bundles/router.umd.js',\n '@angular/platform-browser': 'angular:platform-browser/bundles/platform-browser.umd.js',\n '@angular/platform-browser-dynamic': 'angular:platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',\n '@angular/material': 'angular:material/bundles/material.umd.js',\n 'rxjs': 'https://unpkg.com/rxjs'\n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\n\nSystem.import('main.ts').catch(console.error.bind(console));\n","main.ts":"import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport { enableProdMode } from '@angular/core';\nimport { AppModule } from './app.module';\nimport { enableRipple } from '@syncfusion/ej2-base';\n\nenableRipple(true);\n\nenableProdMode();\nplatformBrowserDynamic().bootstrapModule(AppModule);"}

src/grid/exporting.component.ts renamed to src/grid/default-exporting.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ClickEventArgs } from '@syncfusion/ej2-navigations'
88

99
@Component({
1010
selector: 'control-content',
11-
templateUrl: 'exporting.html',
11+
templateUrl: 'default-exporting.html',
1212
providers: [ToolbarService, PageService, ExcelExportService, PdfExportService, GroupService]
1313

1414
})
File renamed without changes.

src/grid/default-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)