Skip to content

Commit 95bc703

Browse files
Integrated latest changes at 04-11-2025 10:30:13 PM
1 parent 4382e85 commit 95bc703

File tree

28 files changed

+622
-142
lines changed

28 files changed

+622
-142
lines changed

ej2-angular/code-snippet/grid/adapter-result/src/app.component.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { NgModule } from '@angular/core'
2-
import { BrowserModule } from '@angular/platform-browser'
3-
import { GridModule,PageService } from '@syncfusion/ej2-angular-grids'
4-
import { ButtonModule } from '@syncfusion/ej2-angular-buttons'
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { GridModule, PageService } from '@syncfusion/ej2-angular-grids';
4+
import { ButtonModule } from '@syncfusion/ej2-angular-buttons';
55
import { Component, OnInit } from '@angular/core';
6+
import { CommonModule } from '@angular/common';
67
import { DataManager, WebApiAdaptor, Query, ReturnOption } from '@syncfusion/ej2-data';
78

89
const SERVICE_URI: string = 'https://ej2services.syncfusion.com/production/web-services/';
@@ -16,8 +17,8 @@ interface Order {
1617
}
1718

1819
@Component({
19-
imports: [ GridModule, ButtonModule],
20-
providers: [PageService],
20+
imports: [ GridModule, ButtonModule, CommonModule ],
21+
providers: [ PageService ],
2122
standalone: true,
2223
selector: 'app-root',
2324
template: `
@@ -33,22 +34,23 @@ interface Order {
3334
<e-column field='Freight' headerText='Freight' width='150' format="C2" textAlign='Right'></e-column>
3435
<e-column field='ShipCountry' headerText='Ship Country' width='150' ></e-column>
3536
</e-columns>
36-
</ejs-grid>`
37+
</ejs-grid>
38+
`
3739
})
3840

3941
export class AppComponent implements OnInit {
4042
public statusMessage: string = '';
41-
public getData: DataManager;
43+
public getData!: DataManager;
4244
public result: Order[] = [];
4345

4446
public ngOnInit(): void {
45-
this.getData= new DataManager({
47+
this.getData = new DataManager({
4648
url: SERVICE_URI + 'api/Orders',
4749
adaptor: new WebApiAdaptor()
4850
});
4951
}
5052

51-
public executeQuery(event:MouseEvent): void {
53+
public executeQuery(event: MouseEvent): void {
5254
this.statusMessage = "Fetching data...";
5355
this.getData.executeQuery(new Query()).then((e: ReturnOption) => {
5456
this.result = e.result as Order[];
@@ -57,4 +59,4 @@ export class AppComponent implements OnInit {
5759
this.statusMessage = "Error fetching data!";
5860
});
5961
}
60-
}
62+
}

ej2-angular/code-snippet/grid/frozencolumns-cs5/src/app.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class AppComponent implements OnInit {
2525
public toolbar?: string[];
2626
public editSettings?: Object;
2727
public datePickerParams?: Object;
28-
public datePickerObj: DatePicker;
28+
public datePickerObj?: DatePicker;
2929
ngOnInit(): void {
3030
this.data=data;
3131
this.pageSettings = { pageCount: 5 };
@@ -42,12 +42,12 @@ export class AppComponent implements OnInit {
4242
return document.createElement('input');
4343
};
4444
public readDatePicker = (): Date => {
45-
return this.datePickerObj.value;
45+
return this.datePickerObj?.value;
4646
};
4747
public destroyDatePicker = (): void => {
48-
this.datePickerObj.destroy();
48+
this.datePickerObj?.destroy();
4949
};
50-
public writeDatePicker = (args): void => {
50+
public writeDatePicker = (args:any): void => {
5151
this.datePickerObj = new DatePicker({
5252
value: new Date(args.rowData[args.column.field]),
5353
floatLabelType: 'Never',

ej2-angular/code-snippet/grid/grouping-on-page-size/src/app.component.ts

Lines changed: 0 additions & 51 deletions
This file was deleted.

ej2-angular/code-snippet/grid/grouping-on-page-size/src/styles.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

ej2-angular/code-snippet/grid/grouping-on-page-size/index.html renamed to ej2-angular/code-snippet/grid/localization-cs7/index.html

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,7 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<meta name="description" content="Typescript UI Controls" />
8-
9-
<meta name="author" content="Syncfusion" />
10-
<style>
11-
#loader {
12-
color: #008cff;
13-
font-family: 'Helvetica Neue','calibiri';
14-
font-size: 16px;
15-
height: 40px;
16-
left: 45%;
17-
position: absolute;
18-
top: 45%;
19-
width: 30%;
20-
}
21-
#EmployeeID {
22-
width: 100%;
23-
}
24-
</style>
8+
<meta name="author" content="Syncfusion" />
259
</head>
2610
<body style="margin-top: 125px">
2711
<app-root>

ej2-angular/code-snippet/grid/grouping-on-page-size/package.json renamed to ej2-angular/code-snippet/grid/localization-cs7/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"@angular/platform-browser-dynamic": "17.1.2",
1616
"@syncfusion/ej2-angular-grids": "*",
1717
"@syncfusion/ej2-base": "*",
18-
"@syncfusion/ej2-data": "*",
19-
"@syncfusion/ej2-buttons": "*",
18+
"@syncfusion/ej2-angular-buttons": "*",
2019
"@syncfusion/ej2-calendars": "*",
2120
"@syncfusion/ej2-dropdowns": "*",
2221
"@syncfusion/ej2-inputs": "*",
@@ -33,8 +32,7 @@
3332
"moment": "2.29.4",
3433
"rxjs": "7.8.0",
3534
"tslib": "2.3.0",
36-
"zone.js": "0.14.3",
37-
"@syncfusion/ej2-grids": "*"
35+
"zone.js": "0.14.3"
3836
},
3937
"devDependencies": {
4038
"@angular-devkit/build-angular": "17.1.2",
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { ViewChild} from '@angular/core'
2+
import { GridModule, PageService, GridComponent } from '@syncfusion/ej2-angular-grids'
3+
import { L10n, setCulture, setCurrencyCode } from '@syncfusion/ej2-base';
4+
import { Component, OnInit } from '@angular/core';
5+
import { data } from './datasource';
6+
import frFRLocalization from './locale.json';
7+
L10n.load(frFRLocalization);
8+
setCulture('fr-FR'); // Change the Grid culture
9+
setCurrencyCode('EUR');
10+
@Component({
11+
imports: [GridModule],
12+
13+
providers: [PageService],
14+
standalone: true,
15+
selector: 'app-root',
16+
template: `
17+
<ejs-grid #grid1 id='Grid1' style="padding: 10px 10px" [dataSource]='data' [allowPaging]='true' height='220px' [locale]='locale'>
18+
<e-columns>
19+
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column>
20+
<e-column field='CustomerID' headerText='Customer ID' width=100></e-column>
21+
<e-column field='Freight' headerText='Freight' format="C2" width=90></e-column>
22+
<e-column field="ShipCountry" headerText="Ship Country" width="100"></e-column>
23+
</e-columns>
24+
</ejs-grid>
25+
<ejs-grid #grid2 id='Grid2' [dataSource]='data' height='220px' [allowPaging]="true" [locale]='locale1'>
26+
<e-columns>
27+
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column>
28+
<e-column field='CustomerID' headerText='Customer ID' width=100></e-column>
29+
<e-column field='Freight' headerText='Freight' format="C2" width=90></e-column>
30+
<e-column field="ShipCountry" headerText="Ship Country" width="100"></e-column>
31+
</e-columns>
32+
</ejs-grid>`
33+
})
34+
export class AppComponent implements OnInit {
35+
@ViewChild('grid1')
36+
grid1!: GridComponent;
37+
@ViewChild('grid2')
38+
grid2!: GridComponent;
39+
public data?: object[];
40+
public locale: any = 'fr-FR';
41+
public locale1: any = 'en-US';
42+
ngOnInit(): void {
43+
this.data = data;
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export let data: Object[] = [
22
{
3-
OrderID: 10248, CustomerID: 'VINET', EmployeeID: 5, OrderDate: new Date(8364186e5),
3+
OrderID: 10248, CustomerID: 'VINET', EmployeeID: 5, OrderDate: new Date(8379738e5),
44
ShipName: 'Vins et alcools Chevalier', ShipCity: 'Reims', ShipAddress: '59 rue de l Abbaye',
55
ShipRegion: 'CJ', ShipPostalCode: '51100', ShipCountry: 'France', Freight: 32.38, Verified: !0
66
},
77
{
8-
OrderID: 10249, CustomerID: 'TOMSP', EmployeeID: 6, OrderDate: new Date(836505e6),
8+
OrderID: 10249, CustomerID: 'TOMSP', EmployeeID: 6, OrderDate: new Date(8377146e5),
99
ShipName: 'Toms Spezialitäten', ShipCity: 'Münster', ShipAddress: 'Luisenstr. 48',
1010
ShipRegion: 'CJ', ShipPostalCode: '44087', ShipCountry: 'Germany', Freight: 11.61, Verified: !1
1111
},
@@ -15,17 +15,17 @@ export let data: Object[] = [
1515
ShipRegion: 'RJ', ShipPostalCode: '05454-876', ShipCountry: 'Brazil', Freight: 65.83, Verified: !0
1616
},
1717
{
18-
OrderID: 10251, CustomerID: 'VICTE', EmployeeID: 3, OrderDate: new Date(8367642e5),
18+
OrderID: 10251, CustomerID: 'VICTE', EmployeeID: 3, OrderDate: new Date(8376282e5),
1919
ShipName: 'Victuailles en stock', ShipCity: 'Lyon', ShipAddress: '2, rue du Commerce',
2020
ShipRegion: 'CJ', ShipPostalCode: '69004', ShipCountry: 'France', Freight: 41.34, Verified: !0
2121
},
2222
{
23-
OrderID: 10252, CustomerID: 'SUPRD', EmployeeID: 4, OrderDate: new Date(8368506e5),
23+
OrderID: 10252, CustomerID: 'SUPRD', EmployeeID: 4, OrderDate: new Date(8375418e5),
2424
ShipName: 'Suprêmes délices', ShipCity: 'Charleroi', ShipAddress: 'Boulevard Tirou, 255',
2525
ShipRegion: 'CJ', ShipPostalCode: 'B-6000', ShipCountry: 'Belgium', Freight: 51.3, Verified: !0
2626
},
2727
{
28-
OrderID: 10253, CustomerID: 'HANAR', EmployeeID: 3, OrderDate: new Date(836937e6),
28+
OrderID: 10253, CustomerID: 'HANAR', EmployeeID: 3, OrderDate: new Date(8374554e5),
2929
ShipName: 'Hanari Carnes', ShipCity: 'Rio de Janeiro', ShipAddress: 'Rua do Paço, 67',
3030
ShipRegion: 'RJ', ShipPostalCode: '05454-876', ShipCountry: 'Brazil', Freight: 58.17, Verified: !0
3131
},
@@ -40,37 +40,37 @@ export let data: Object[] = [
4040
ShipRegion: 'CJ', ShipPostalCode: '1204', ShipCountry: 'Switzerland', Freight: 148.33, Verified: !0
4141
},
4242
{
43-
OrderID: 10256, CustomerID: 'WELLI', EmployeeID: 3, OrderDate: new Date(837369e6),
43+
OrderID: 10256, CustomerID: 'WELLI', EmployeeID: 3, OrderDate: new Date(8371098e5),
4444
ShipName: 'Wellington Importadora', ShipCity: 'Resende', ShipAddress: 'Rua do Mercado, 12',
4545
ShipRegion: 'SP', ShipPostalCode: '08737-363', ShipCountry: 'Brazil', Freight: 13.97, Verified: !1
4646
},
4747
{
48-
OrderID: 10257, CustomerID: 'HILAA', EmployeeID: 4, OrderDate: new Date(8374554e5),
48+
OrderID: 10257, CustomerID: 'HILAA', EmployeeID: 4, OrderDate: new Date(836937e6),
4949
ShipName: 'HILARION-Abastos', ShipCity: 'San Cristóbal', ShipAddress: 'Carrera 22 con Ave. Carlos Soublette #8-35',
5050
ShipRegion: 'Táchira', ShipPostalCode: '5022', ShipCountry: 'Venezuela', Freight: 81.91, Verified: !0
5151
},
5252
{
53-
OrderID: 10258, CustomerID: 'ERNSH', EmployeeID: 1, OrderDate: new Date(8375418e5),
53+
OrderID: 10258, CustomerID: 'ERNSH', EmployeeID: 1, OrderDate: new Date(8368506e5),
5454
ShipName: 'Ernst Handel', ShipCity: 'Graz', ShipAddress: 'Kirchgasse 6',
5555
ShipRegion: 'CJ', ShipPostalCode: '8010', ShipCountry: 'Austria', Freight: 140.51, Verified: !0
5656
},
5757
{
58-
OrderID: 10259, CustomerID: 'CENTC', EmployeeID: 4, OrderDate: new Date(8376282e5),
58+
OrderID: 10259, CustomerID: 'CENTC', EmployeeID: 4, OrderDate: new Date(8367642e5),
5959
ShipName: 'Centro comercial Moctezuma', ShipCity: 'México D.F.', ShipAddress: 'Sierras de Granada 9993',
6060
ShipRegion: 'CJ', ShipPostalCode: '05022', ShipCountry: 'Mexico', Freight: 3.25, Verified: !1
6161
},
6262
{
63-
OrderID: 10260, CustomerID: 'OTTIK', EmployeeID: 4, OrderDate: new Date(8377146e5),
63+
OrderID: 10260, CustomerID: 'OTTIK', EmployeeID: 4, OrderDate: new Date(8367642e5),
6464
ShipName: 'Ottilies Käseladen', ShipCity: 'Köln', ShipAddress: 'Mehrheimerstr. 369',
6565
ShipRegion: 'CJ', ShipPostalCode: '50739', ShipCountry: 'Germany', Freight: 55.09, Verified: !0
6666
},
6767
{
68-
OrderID: 10261, CustomerID: 'QUEDE', EmployeeID: 4, OrderDate: new Date(8377146e5),
68+
OrderID: 10261, CustomerID: 'QUEDE', EmployeeID: 4, OrderDate: new Date(836505e6),
6969
ShipName: 'Que Delícia', ShipCity: 'Rio de Janeiro', ShipAddress: 'Rua da Panificadora, 12',
7070
ShipRegion: 'RJ', ShipPostalCode: '02389-673', ShipCountry: 'Brazil', Freight: 3.05, Verified: !1
7171
},
7272
{
73-
OrderID: 10262, CustomerID: 'RATTC', EmployeeID: 8, OrderDate: new Date(8379738e5),
73+
OrderID: 10262, CustomerID: 'RATTC', EmployeeID: 8, OrderDate: new Date(8364186e5),
7474
ShipName: 'Rattlesnake Canyon Grocery', ShipCity: 'Albuquerque', ShipAddress: '2817 Milton Dr.',
7575
ShipRegion: 'NM', ShipPostalCode: '87110', ShipCountry: 'USA', Freight: 48.29, Verified: !0
7676
}];

0 commit comments

Comments
 (0)