Skip to content

Commit 51eab1b

Browse files
author
pipeline
committed
feature(EJ2-3995): column chooser samples
1 parent 5901f99 commit 51eab1b

32 files changed

+136
-85
lines changed

package.json

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
{
2-
"name": "@syncfusion/ej2-ng-samples",
3-
"version": "1.0.16",
4-
"description": "Essential JS 2 Sample Browser for Angular",
5-
"author": "Syncfusion Inc.",
6-
"license": "SEE LICENSE IN license",
7-
"dependencies": {
8-
"@angular/common": "^4.3.0",
9-
"@angular/compiler": "^4.3.0",
10-
"@angular/core": "^4.3.0",
11-
"@angular/forms": "^4.3.0",
12-
"@angular/http": "^4.3.0",
13-
"@angular/upgrade": "^4.3.0",
14-
"@angular/platform-browser": "^4.3.0",
15-
"@angular/platform-browser-dynamic": "^4.3.0",
16-
"@angular/router": "^4.3.0",
17-
"zone.js": "^0.8.4",
18-
"core-js": "^2.4.1",
19-
"rxjs": "^5.0.1",
20-
"@syncfusion/ej2": "^1.0.16",
21-
"@syncfusion/ej2-ng-base": "^1.0.16",
22-
"@syncfusion/ej2-ng-buttons": "^1.0.14",
23-
"@syncfusion/ej2-ng-lists": "^1.0.14",
24-
"@syncfusion/ej2-ng-grids": "^1.0.16",
25-
"@syncfusion/ej2-ng-charts": "^1.0.16",
26-
"@syncfusion/ej2-ng-circulargauge": "^1.0.14",
27-
"@syncfusion/ej2-ng-lineargauge": "^1.0.14",
28-
"@syncfusion/ej2-ng-dropdowns": "^1.0.16",
29-
"@syncfusion/ej2-ng-calendars": "^1.0.16",
30-
"@syncfusion/ej2-ng-navigations": "^1.0.14",
31-
"@syncfusion/ej2-ng-inputs": "^1.0.16",
32-
"@syncfusion/ej2-ng-popups": "^1.0.16",
33-
"systemjs": "^0.19.40",
34-
"reflect-metadata": "^0.1.9"
35-
},
36-
"devDependencies": {
37-
"@angular/compiler-cli": "^4.3.0",
38-
"@angular/platform-server": "^4.3.0",
39-
"@types/jasmine": "^2.2.29",
40-
"@types/requirejs": "^2.1.26",
41-
"@types/node": "^6.0.46",
42-
"es6-module-loader": "^0.17.11",
43-
"gulp-clean": "^0.3.2",
44-
"karma-systemjs": "^0.16.0",
45-
"systemjs-plugin-babel": "0.0.17",
46-
"es6-promise": "^3.2.1",
47-
"gulp": "^3.9.1",
48-
"gulp-sass": "^3.1.0",
49-
"gulp-typescript": "^3.1.6",
50-
"requirejs": "^2.3.3",
51-
"typescript": "2.3.4",
52-
"browser-sync": "2.11.2",
53-
"webpack": "2.5.1"
54-
},
55-
"scripts": {
56-
"build": "gulp styles && ngc -p tsconfig-aot.json && gulp bundle",
57-
"serve": "npm run build && gulp serve"
58-
}
2+
"name": "@syncfusion/ej2-ng-samples",
3+
"version": "0.0.1",
4+
"description": "Essential JS 2 Sample Browser for Angular",
5+
"author": "Syncfusion Inc.",
6+
"license": "SEE LICENSE IN license",
7+
"dependencies": {
8+
"@angular/common": "^4.3.0",
9+
"@angular/compiler": "^4.3.0",
10+
"@angular/core": "^4.3.0",
11+
"@angular/forms": "^4.3.0",
12+
"@angular/http": "^4.3.0",
13+
"@angular/upgrade": "^4.3.0",
14+
"@angular/platform-browser": "^4.3.0",
15+
"@angular/platform-browser-dynamic": "^4.3.0",
16+
"@angular/router": "^4.3.0",
17+
"zone.js": "^0.8.4",
18+
"core-js": "^2.4.1",
19+
"rxjs": "^5.0.1",
20+
"@syncfusion/ej2": "*",
21+
"@syncfusion/ej2-ng-base": "*",
22+
"@syncfusion/ej2-ng-buttons": "*",
23+
"@syncfusion/ej2-ng-lists": "*",
24+
"@syncfusion/ej2-ng-grids": "*",
25+
"@syncfusion/ej2-ng-charts": "*",
26+
"@syncfusion/ej2-ng-circulargauge": "*",
27+
"@syncfusion/ej2-ng-lineargauge": "*",
28+
"@syncfusion/ej2-ng-dropdowns": "*",
29+
"@syncfusion/ej2-ng-calendars": "*",
30+
"@syncfusion/ej2-ng-navigations": "*",
31+
"@syncfusion/ej2-ng-inputs": "*",
32+
"@syncfusion/ej2-ng-popups": "*",
33+
"systemjs": "^0.19.40",
34+
"reflect-metadata": "^0.1.9"
35+
},
36+
"devDependencies": {
37+
"@angular/compiler-cli": "^4.3.0",
38+
"@angular/platform-server": "^4.3.0",
39+
"@types/jasmine": "^2.2.29",
40+
"@types/requirejs": "^2.1.26",
41+
"@types/node": "^6.0.46",
42+
"es6-module-loader": "^0.17.11",
43+
"gulp-clean": "^0.3.2",
44+
"karma-systemjs": "^0.16.0",
45+
"systemjs-plugin-babel": "0.0.17",
46+
"es6-promise": "^3.2.1",
47+
"gulp": "^3.9.1",
48+
"gulp-sass": "^3.1.0",
49+
"gulp-typescript": "^3.1.6",
50+
"requirejs": "^2.3.3",
51+
"typescript": "2.3.4",
52+
"browser-sync": "2.11.2",
53+
"webpack": "2.5.1"
54+
},
55+
"scripts": {
56+
"build": "gulp styles && ngc -p tsconfig-aot.json && gulp bundle",
57+
"serve": "npm run build && gulp serve"
58+
}
5959
}

src/grid/aggregatedefault-plnkr.json

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

src/grid/aggregategroup-plnkr.json

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

src/grid/column/autowrap-plnkr.json

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

src/grid/column/columnchooser-plnkr.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { ToolbarService } from '@syncfusion/ej2-ng-grids';
3+
import { data } from '../data';
4+
5+
@Component({
6+
selector: 'ej2-grid-container',
7+
templateUrl: 'columnchooser.html',
8+
providers: [ToolbarService]
9+
})
10+
export class ColumnChooserComponent implements OnInit {
11+
public data: Object[];
12+
public toolbar: string[];
13+
ngOnInit(): void {
14+
this.data = data;
15+
this.toolbar = ['columnchooser'];
16+
}
17+
}

src/grid/column/columnchooser.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div class="control-section">
2+
<ej-grid [dataSource]='data' allowPaging='true' showColumnChooser='true' [toolbar]="toolbar">
3+
<e-columns>
4+
<e-column field='OrderID' headerText='Order ID' width='120' textAlign="right"></e-column>
5+
<e-column field='CustomerName' headerText='Customer Name' width='150' showInColumnChooser='false'></e-column>
6+
<e-column field='OrderDate' headerText='Order Date' width='130' format="yMd" textAlign="right"></e-column>
7+
<e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign="right"></e-column>
8+
<e-column field='ShippedDate' headerText='Shipped Date' width='130' format="yMd" textAlign="right"></e-column>
9+
<e-column field='ShipCountry' headerText='Ship Country' visible='false' width='150'></e-column>
10+
<e-column field='ShipCity' headerText='Ship City' visible='false' width='150'></e-column>
11+
</e-columns>
12+
</ej-grid>
13+
<div id="description">
14+
<p>The Grid columns can be shown/hidden dynamically by using column chooser. To enable column chooser behavior, set
15+
<code><a target="_blank" class="code"
16+
href="http://ej2.syncfusion.com/angular/documentation/grid/api-grid.html#showColumnChooser-boolean">showColumnChooser
17+
</a></code> property as true. You can also prevent to display the particular column in column chooser
18+
by setting
19+
<code><a target="_blank" class="code"
20+
href="http://ej2.syncfusion.com/angular/documentation/grid/api-column.html#showInColumnChooser-boolean">columns->showInColumnChooser
21+
</a></code> as false in columns definition.
22+
23+
</p>
24+
<br/>
25+
26+
<p>
27+
In this demo, when the user clicks column chooser icon from the toolbar, then column chooser menu will open, user the can
28+
show or hide the columns by changing the state of the checkbox.
29+
</p>
30+
</div>
31+
</div>

src/grid/column/reorder-plnkr.json

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

src/grid/column/showhide-plnkr.json

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

src/grid/column/stackedheader-plnkr.json

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

0 commit comments

Comments
 (0)