Skip to content

DOCINFRA-2341_merged_using_automation #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions ej2-javascript/code-snippet/grid/AlignText-cs1/datasource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
export let data: Object[] = [
{
OrderID: 10248, CustomerID: 'VINET', EmployeeID: 5, OrderDate: new Date(8364186e5),
ShipName: 'Vins et alcools Chevalier', ShipCity: 'Reims', ShipAddress: '59 rue de l Abbaye',
ShipRegion: 'CJ', ShipPostalCode: '51100', ShipCountry: 'France', Freight: 32.38, Verified: !0
},
{
OrderID: 10249, CustomerID: 'TOMSP', EmployeeID: 6, OrderDate: new Date(836505e6),
ShipName: 'Toms Spezialitäten', ShipCity: 'Münster', ShipAddress: 'Luisenstr. 48',
ShipRegion: 'CJ', ShipPostalCode: '44087', ShipCountry: 'Germany', Freight: 11.61, Verified: !1
},
{
OrderID: 10250, CustomerID: 'HANAR', EmployeeID: 4, OrderDate: new Date(8367642e5),
ShipName: 'Hanari Carnes', ShipCity: 'Rio de Janeiro', ShipAddress: 'Rua do Paço, 67',
ShipRegion: 'RJ', ShipPostalCode: '05454-876', ShipCountry: 'Brazil', Freight: 65.83, Verified: !0
},
{
OrderID: 10251, CustomerID: 'VICTE', EmployeeID: 3, OrderDate: new Date(8367642e5),
ShipName: 'Victuailles en stock', ShipCity: 'Lyon', ShipAddress: '2, rue du Commerce',
ShipRegion: 'CJ', ShipPostalCode: '69004', ShipCountry: 'France', Freight: 41.34, Verified: !0
},
{
OrderID: 10252, CustomerID: 'SUPRD', EmployeeID: 4, OrderDate: new Date(8368506e5),
ShipName: 'Suprêmes délices', ShipCity: 'Charleroi', ShipAddress: 'Boulevard Tirou, 255',
ShipRegion: 'CJ', ShipPostalCode: 'B-6000', ShipCountry: 'Belgium', Freight: 51.3, Verified: !0
},
{
OrderID: 10253, CustomerID: 'HANAR', EmployeeID: 3, OrderDate: new Date(836937e6),
ShipName: 'Hanari Carnes', ShipCity: 'Rio de Janeiro', ShipAddress: 'Rua do Paço, 67',
ShipRegion: 'RJ', ShipPostalCode: '05454-876', ShipCountry: 'Brazil', Freight: 58.17, Verified: !0
},
{
OrderID: 10254, CustomerID: 'CHOPS', EmployeeID: 5, OrderDate: new Date(8370234e5),
ShipName: 'Chop-suey Chinese', ShipCity: 'Bern', ShipAddress: 'Hauptstr. 31',
ShipRegion: 'CJ', ShipPostalCode: '3012', ShipCountry: 'Switzerland', Freight: 22.98, Verified: !1
},
{
OrderID: 10255, CustomerID: 'RICSU', EmployeeID: 9, OrderDate: new Date(8371098e5),
ShipName: 'Richter Supermarkt', ShipCity: 'Genève', ShipAddress: 'Starenweg 5',
ShipRegion: 'CJ', ShipPostalCode: '1204', ShipCountry: 'Switzerland', Freight: 148.33, Verified: !0
},
{
OrderID: 10256, CustomerID: 'WELLI', EmployeeID: 3, OrderDate: new Date(837369e6),
ShipName: 'Wellington Importadora', ShipCity: 'Resende', ShipAddress: 'Rua do Mercado, 12',
ShipRegion: 'SP', ShipPostalCode: '08737-363', ShipCountry: 'Brazil', Freight: 13.97, Verified: !1
},
{
OrderID: 10257, CustomerID: 'HILAA', EmployeeID: 4, OrderDate: new Date(8374554e5),
ShipName: 'HILARION-Abastos', ShipCity: 'San Cristóbal', ShipAddress: 'Carrera 22 con Ave. Carlos Soublette #8-35',
ShipRegion: 'Táchira', ShipPostalCode: '5022', ShipCountry: 'Venezuela', Freight: 81.91, Verified: !0
},
{
OrderID: 10258, CustomerID: 'ERNSH', EmployeeID: 1, OrderDate: new Date(8375418e5),
ShipName: 'Ernst Handel', ShipCity: 'Graz', ShipAddress: 'Kirchgasse 6',
ShipRegion: 'CJ', ShipPostalCode: '8010', ShipCountry: 'Austria', Freight: 140.51, Verified: !0
},
{
OrderID: 10259, CustomerID: 'CENTC', EmployeeID: 4, OrderDate: new Date(8376282e5),
ShipName: 'Centro comercial Moctezuma', ShipCity: 'México D.F.', ShipAddress: 'Sierras de Granada 9993',
ShipRegion: 'CJ', ShipPostalCode: '05022', ShipCountry: 'Mexico', Freight: 3.25, Verified: !1
},
{
OrderID: 10260, CustomerID: 'OTTIK', EmployeeID: 4, OrderDate: new Date(8377146e5),
ShipName: 'Ottilies Käseladen', ShipCity: 'Köln', ShipAddress: 'Mehrheimerstr. 369',
ShipRegion: 'CJ', ShipPostalCode: '50739', ShipCountry: 'Germany', Freight: 55.09, Verified: !0
},
{
OrderID: 10261, CustomerID: 'QUEDE', EmployeeID: 4, OrderDate: new Date(8377146e5),
ShipName: 'Que Delícia', ShipCity: 'Rio de Janeiro', ShipAddress: 'Rua da Panificadora, 12',
ShipRegion: 'RJ', ShipPostalCode: '02389-673', ShipCountry: 'Brazil', Freight: 3.05, Verified: !1
},
{
OrderID: 10262, CustomerID: 'RATTC', EmployeeID: 8, OrderDate: new Date(8379738e5),
ShipName: 'Rattlesnake Canyon Grocery', ShipCity: 'Albuquerque', ShipAddress: '2817 Milton Dr.',
ShipRegion: 'NM', ShipPostalCode: '87110', ShipCountry: 'USA', Freight: 48.29, Verified: !0
}];

219 changes: 219 additions & 0 deletions ej2-javascript/code-snippet/grid/AlignText-cs1/es5-datasource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
var data = [
{
'OrderID': 10248,
'CustomerID': 'VINET',
'OrderDate': new Date(8364186e5),
'ShippedDate': new Date(704692800000),
'Freight': 32.38,
'ShipName': 'Vins et alcools Chevalier',
'ShipAddress': '59 rue de l\'Abbaye',
'ShipCity': 'Reims',
'ShipRegion': null,
'ShipCountry': 'France'
},
{
'OrderID': 10249,
'CustomerID': 'TOMSP',
'OrderDate': new Date(836505e6),
'ShippedDate': new Date(713764800000),
'Freight': 11.61,
'ShipName': 'Toms Spezialitäten',
'ShipAddress': 'Luisenstr. 48',
'ShipCity': 'Münster',
'ShipRegion': null,
'ShipCountry': 'Germany'
},
{
'OrderID': 10250,
'CustomerID': 'HANAR',
'OrderDate': new Date(8367642e5),
'ShippedDate': new Date(702104400000),
'Freight': 65.83,
'ShipName': 'Hanari Carnes',
'ShipAddress': 'Rua do Paço, 67',
'ShipCity': 'Rio de Janeiro',
'ShipRegion': 'RJ',
'ShipCountry': 'Brazil'
},
{
'OrderID': 10251,
'CustomerID': 'VICTE',
'OrderDate': new Date(8367642e5),
'ShippedDate': new Date(736401600000),
'Freight': 41.34,
'ShipName': 'Victuailles en stock',
'ShipAddress': '2, rue du Commerce',
'ShipCity': 'Lyon',
'ShipRegion': null,
'ShipCountry': 'France'
},
{
'OrderID': 10252,
'CustomerID': 'SUPRD',
'OrderDate': new Date(8368506e5),
'ShippedDate': new Date(750830400000),
'Freight': 51.3,
'ShipName': 'Suprêmes délices',
'ShipAddress': 'Boulevard Tirou, 255',
'ShipCity': 'Charleroi',
'ShipRegion': null,
'ShipCountry': 'Belgium'
},
{
'OrderID': 10253,
'CustomerID': 'HANAR',
'OrderDate': new Date(836937e6),
'ShippedDate': new Date(750830400000),
'Freight': 58.17,
'ShipName': 'Hanari Carnes',
'ShipAddress': 'Rua do Paço, 67',
'ShipCity': 'Rio de Janeiro',
'ShipRegion': 'RJ',
'ShipCountry': 'Brazil'
},
{
'OrderID': 10254,
'CustomerID': 'CHOPS',
'OrderDate': new Date(8370234e5),
'ShippedDate': new Date(757486800000),
'Freight': 22.98,
'ShipName': 'Chop-suey Chinese',
'ShipAddress': 'Hauptstr. 31',
'ShipCity': 'Bern',
'ShipRegion': null,
'ShipCountry': 'Switzerland'
},
{
'OrderID': 10255,
'CustomerID': 'RICSU',
'OrderDate': new Date(8371098e5),
'ShippedDate': new Date(762843600000),
'Freight': 148.33,
'ShipName': 'Richter Supermarkt',
'ShipAddress': 'Starenweg 5',
'ShipCity': 'Genève',
'ShipRegion': null,
'ShipCountry': 'Switzerland'
},
{
'OrderID': 10256,
'CustomerID': 'WELLI',
'OrderDate': new Date(837369e6),
'ShippedDate': new Date(784875600000),
'Freight': 13.97,
'ShipName': 'Wellington Importadora',
'ShipAddress': 'Rua do Mercado, 12',
'ShipCity': 'Resende',
'ShipRegion': 'SP',
'ShipCountry': 'Brazil'
},
{
'OrderID': 10257,
'CustomerID': 'HILAA',
'OrderDate': new Date(8374554e5),
'ShippedDate': new Date(704692800000),
'Freight': 81.91,
'ShipName': 'HILARION-Abastos',
'ShipAddress': 'Carrera 22 con Ave. Carlos Soublette #8-35',
'ShipCity': 'San Cristóbal',
'ShipRegion': 'Táchira',
'ShipCountry': 'Venezuela'
},
{
'OrderID': 10258,
'CustomerID': 'ERNSH',
'OrderDate': new Date(8375418e5),
'ShippedDate': new Date(713764800000),
'Freight': 140.51,
'ShipName': 'Ernst Handel',
'ShipAddress': 'Kirchgasse 6',
'ShipCity': 'Graz',
'ShipRegion': null,
'ShipCountry': 'Austria'
},
{
'OrderID': 10259,
'CustomerID': 'CENTC',
'OrderDate': new Date(8376282e5),
'ShippedDate': new Date(702104400000),
'Freight': 3.25,
'ShipName': 'Centro comercial Moctezuma',
'ShipAddress': 'Sierras de Granada 9993',
'ShipCity': 'México D.F.',
'ShipRegion': null,
'ShipCountry': 'Mexico'
},
{
'OrderID': 10260,
'CustomerID': 'OTTIK',
'OrderDate': new Date(8377146e5),
'ShippedDate': new Date(736401600000),
'Freight': 55.09,
'ShipName': 'Ottilies Käseladen',
'ShipAddress': 'Mehrheimerstr. 369',
'ShipCity': 'Köln',
'ShipRegion': null,
'ShipCountry': 'Germany'
},
{
'OrderID': 10261,
'CustomerID': 'QUEDE',
'OrderDate': new Date(8377146e5),
'ShippedDate': new Date(750830400000),
'Freight': 3.05,
'ShipName': 'Que Delícia',
'ShipAddress': 'Rua da Panificadora, 12',
'ShipCity': 'Rio de Janeiro',
'ShipRegion': 'RJ',
'ShipCountry': 'Brazil'
},
{
'OrderID': 10262,
'CustomerID': 'RATTC',
'OrderDate': new Date(8379738e5),
'ShippedDate': new Date(750830400000),
'Freight': 48.29,
'ShipName': 'Rattlesnake Canyon Grocery',
'ShipAddress': '2817 Milton Dr.',
'ShipCity': 'Albuquerque',
'ShipRegion': 'NM',
'ShipCountry': 'USA'
},
{
'OrderID': 10263,
'CustomerID': 'ERNSH',
'OrderDate': new Date(8364186e5),
'ShippedDate': new Date(757486800000),
'Freight': 146.06,
'ShipName': 'Ernst Handel',
'ShipAddress': 'Kirchgasse 6',
'ShipCity': 'Graz',
'ShipRegion': null,
'ShipCountry': 'Austria'
},
{
'OrderID': 10264,
'CustomerID': 'FOLKO',
'OrderDate': new Date(836505e6),
'ShippedDate': '1996-08-23T00:00:00.000Z',
'Freight': 3.67,
'ShipName': 'Folk och fä HB',
'ShipAddress': 'Ã…kergatan 24',
'ShipCity': 'Bräcke',
'ShipRegion': null,
'ShipCountry': 'Sweden'
},
{
'OrderID': 10265,
'CustomerID': 'BLONP',
'OrderDate': new Date(8367642e5),
'ShippedDate': new Date(762843600000),
'Freight': 55.28,
'ShipName': 'Blondel père et fils',
'ShipAddress': '24, place Kléber',
'ShipCity': 'Strasbourg',
'ShipRegion': null,
'ShipCountry': 'France'
}
];

14 changes: 14 additions & 0 deletions ej2-javascript/code-snippet/grid/AlignText-cs1/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#container {
visibility: hidden;
}

#loader {
color: #008cff;
font-family: 'Helvetica Neue','calibiri';
font-size: 14px;
height: 40px;
left: 45%;
position: absolute;
top: 45%;
width: 30%;
}
34 changes: 34 additions & 0 deletions ej2-javascript/code-snippet/grid/AlignText-cs1/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
var grid = new ej.grids.Grid({
dataSource: data,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 120 },
{ field: 'CustomerID', headerText: 'Customer ID', width: 140 },
{ field: 'Freight', headerText: 'Freight', format: 'C', width: 120 },
{ field: 'OrderDate', headerText: 'Order Date', format: 'yMd', width: 140 },
],
height: 315,
});
grid.appendTo('#Grid');

var alignmentData = [
{ text: 'Left', value: 'Left' },
{ text: 'Right', value: 'Right' },
{ text: 'Center', value: 'Center' },
{ text: 'Justify', value: 'Justify' }
]

var dropdownList = new ej.dropdowns.DropDownList({
value: 'Left',
popupHeight: '240px',
width: 100,
dataSource: alignmentData,
change: changeAlignment,
});
dropdownList.appendTo('#dropdown');

function changeAlignment(args) {
grid.columns.forEach((column) => {
column.headerTextAlign = args.value
})
grid.refreshHeader();
}
33 changes: 33 additions & 0 deletions ej2-javascript/code-snippet/grid/AlignText-cs1/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Grid,ChangeEventArgs, ColumnModel } from '@syncfusion/ej2-grids';
import { DropDownList } from '@syncfusion/ej2-dropdowns';
import { data } from './datasource.ts';

let grid: Grid = new Grid({
dataSource: data,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 120 },
{ field: 'CustomerID', headerText: 'Customer Name', width: 150 },
{ field: 'Freight', headerText: 'Freight',format: 'C2', width: 120 },
{ field: 'OrderDate', headerText: 'Order Date', width: 130, format: 'yMd' },
],
height: 315
});
grid.appendTo('#Grid');

let dropdownData = ['Left', 'Right', 'Center', 'Justify'];

let dropDownColumn: DropDownList = new DropDownList({
value: 'Left',
popupHeight: '240px',
width: 100,
dataSource: dropdownData,
change: changeAlignment,
});
dropDownColumn.appendTo('#dropdown');

function changeAlignment(args: ChangeEventArgs) {
grid.columns.forEach((column: ColumnModel) => {
column.headerTextAlign = args.value
})
grid.refreshHeader();
}
Loading