diff --git a/ej2-javascript-toc.html b/ej2-javascript-toc.html index d59979182..89870e9cf 100644 --- a/ej2-javascript-toc.html +++ b/ej2-javascript-toc.html @@ -2199,6 +2199,8 @@
  • Changing the active sheet while importing a file
  • Import an excel document using file uploader
  • Identify the context menu opened
  • +
  • Save and open Spreadsheet data as Base64 string
  • +
  • Insert a sheet programmatically and make it the active sheet
  • Mobile Responsiveness
  • diff --git a/ej2-javascript/code-snippet/data/getting-started-cs1/index.js b/ej2-javascript/code-snippet/data/getting-started-cs1/index.js index 50235aaf6..046355208 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs1/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs1/index.js @@ -1,30 +1,11 @@ +var template = '${OrderID}${CustomerID}${EmployeeID}'; -var template = '${OrderID}${CustomerID}${EmployeeID}' -var group = '' + -'' + -'${for(detail of Order_Details)}${/for}' + -'
    IDPriceQuantity
    ${detail.ProductID}${detail.UnitPrice}${detail.Quantity}
    '; var compiledFunction = ej.base.compile(template); -var groupFn = ej.base.compile(group); -const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/'; +var result = new ej.data.DataManager(data).executeLocal(new ej.data.Query().take(8)); var table = (document.getElementById('datatable')); -new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor }) - .executeQuery(new ej.data.Query().from('Orders').take(3).hierarchy( - new ej.data.Query() - .foreignKey("OrderID") - .from("Order_Details") - .sortBy("Quantity"), - function () { - // Selective loading of child elements - return [10248, 10249, 10250] - } - )) - .then((e) => { - (e.result).forEach((data) => { - table.appendChild(compiledFunction(data)[0]); - table.appendChild(groupFn(data)[0]); - }); - }); \ No newline at end of file +result.forEach((data) => { + table.appendChild(compiledFunction(data)[0]); +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs1/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs1/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs1/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs1/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs1/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs1/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs16/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/index.js b/ej2-javascript/code-snippet/data/getting-started-cs16/index.js index 663759b4c..7c490ef94 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs16/index.js @@ -2,7 +2,7 @@ var template = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().from('Orders').take(8)).then((e: ReturnOption) => { (e.result).forEach((data: Object) => { table.appendChild(compiledFunction(data)[0]); diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs16/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs16/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs16/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs16/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs16/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs16/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs17/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs17/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs17/index.ts index 942ccb4b5..fce5de933 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs17/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().select(['OrderID', 'CustomerID', 'EmployeeID']).take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs17/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs17/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs17/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs17/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs17/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs17/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs17/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs17/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs18/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/index.js b/ej2-javascript/code-snippet/data/getting-started-cs18/index.js index 9ea5f728b..75588d7ba 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs18/index.js @@ -2,13 +2,13 @@ var template = ''; -new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataAdaptor }) +new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor }) .executeQuery(new ej.data.Query().expand('Employee').select(['OrderID', 'CustomerID', 'Employee.FirstName']).take(8)) .then((e) => { (e.result).forEach((data) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs18/index.ts index 957a7c887..77e9a7e8f 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs18/index.ts @@ -1,19 +1,19 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); table.innerHTML = ''; -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().expand('Employee').select(['OrderID', 'CustomerID', 'Employee.FirstName']).take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs18/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs18/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs18/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs18/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs18/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs18/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${Employee.Firs var compiledFunction = ej.base.compile(template); -const SERVICE_URI = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; var table = (document.getElementById('datatable')); table.innerHTML = '
    OrderIDCustomerIDEmployee Name
    ${OrderID}${CustomerID}${Employee.FirstName}
    OrderIDCustomerIDEmployee Name
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs19/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs19/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs19/index.ts index fb6e2a9cf..42f9aa040 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs19/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().sortBy('CustomerID', 'descending').take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs19/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs19/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs19/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs19/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs19/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs19/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs19/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs19/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs2/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs2/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/index.js b/ej2-javascript/code-snippet/data/getting-started-cs2/index.js index 50235aaf6..a44d64058 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs2/index.js @@ -1,30 +1,16 @@ var template = '' -var group = ' diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/waitingpopup.gif b/ej2-javascript/code-snippet/grid/row-template-cs30/waitingpopup.gif deleted file mode 100644 index a2eae442e..000000000 Binary files a/ej2-javascript/code-snippet/grid/row-template-cs30/waitingpopup.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/Medium-36px-spin.gif b/ej2-javascript/code-snippet/grid/row-template-format-cs1/Medium-36px-spin.gif deleted file mode 100644 index fe8c4331b..000000000 Binary files a/ej2-javascript/code-snippet/grid/row-template-format-cs1/Medium-36px-spin.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/row-template-format-cs1/datasource.ts index c7b6b3d0c..34b16355a 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/datasource.ts @@ -1,80 +1,3 @@ -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 - }]; - export let employeeData: Object[] = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/row-template-format-cs1/es5-datasource.js index 7fc7297c3..48931ebb2 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/es5-datasource.js @@ -1,80 +1,3 @@ -var data = [ - { - 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 - }]; - var employeeData = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.js b/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.js index af707aaf3..177ce177d 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.js @@ -13,6 +13,4 @@ var grid = new ej.grids.Grid({ ], height: 315 }); -grid.appendTo('#Grid'); - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.ts b/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.ts index 293a0524a..927804666 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/index.ts @@ -1,5 +1,3 @@ - - import { Grid } from '@syncfusion/ej2-grids'; import { employeeData } from './datasource.ts'; import { Internationalization } from '@syncfusion/ej2-base'; @@ -23,7 +21,4 @@ grid.appendTo('#Grid'); interface IWindow extends Window { formatDate?: Function; -} - - - +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/js/index.html b/ej2-javascript/code-snippet/grid/row-template-format-cs1/js/index.html index a0fa6a6bd..9f0bb8b9a 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/js/index.html @@ -1,28 +1,22 @@ - + +EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + @@ -54,15 +48,15 @@ - - - - @@ -70,16 +64,14 @@ -
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/row-template-format-cs1/systemjs.config.js index 05bf940b7..e32347149 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/row-template-format-cs1/ts/index.html index 279e73e0a..c16a1ed76 100644 --- a/ej2-javascript/code-snippet/grid/row-template-format-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/row-template-format-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + @@ -55,15 +49,15 @@ - - - - diff --git a/ej2-javascript/code-snippet/grid/row-template-format-cs1/waitingpopup.gif b/ej2-javascript/code-snippet/grid/row-template-format-cs1/waitingpopup.gif deleted file mode 100644 index a2eae442e..000000000 Binary files a/ej2-javascript/code-snippet/grid/row-template-format-cs1/waitingpopup.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/datasource.ts b/ej2-javascript/code-snippet/spreadsheet/base-64-string/datasource.ts new file mode 100644 index 000000000..a01e9e6f1 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/datasource.ts @@ -0,0 +1,235 @@ + +export let data: Object[] = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } +]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/es5-datasource.js b/ej2-javascript/code-snippet/spreadsheet/base-64-string/es5-datasource.js new file mode 100644 index 000000000..1b0285a25 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/es5-datasource.js @@ -0,0 +1,234 @@ +var data = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } +]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.js b/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.js new file mode 100644 index 000000000..ff6e52957 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.js @@ -0,0 +1,57 @@ + +var base64String; + +var spreadsheet = new ej.spreadsheet.Spreadsheet({ + openUrl: 'https://services.syncfusion.com/js/production/api/spreadsheet/open', + sheets: [{ + name: 'Car Sales Report', + ranges: [{ dataSource: data }], + columns: [ + { width: 180 }, { width: 130 }, { width: 130 }, { width: 180 }, + { width: 130 }, { width: 120 } + ] + }], + + created: () => { + //Applies cell and number formatting to specified range of the active sheet + spreadsheet.cellFormat({ fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' }, 'A1:F1'); + }, + + beforeSave: (args) => { + args.needBlobData = true; // To trigger the saveComplete event. + args.isFullPost = false; // Get the spreadsheet data as blob data in the saveComplete event. + }, + + saveComplete: (args) => { + // Convert blob data to base64 string. + var reader = new FileReader(); + reader.readAsDataURL(args.blobData); + reader.onloadend = function () { + base64String = reader.result; + }; + } + +}); + +// Render initialized Spreadsheet. +spreadsheet.appendTo('#spreadsheet'); + +document.getElementById("import").onclick = () => { + // Open the file based on saved base64 string. + fetch(base64String) + .then((response) => response.blob()) + .then((fileBlob) => { + var file = new File([fileBlob], 'Sample.xlsx'); + spreadsheet.open({ file: file }); + }); +} + +document.getElementById("export").onclick = () => { + spreadsheet.save({ + url: 'https://services.syncfusion.com/js/production/api/spreadsheet/save', + fileName: 'Worksheet', + saveType: 'Xlsx', + }); // Specifies the save URL, file name, file type need to be saved. + // Logs base64 string into the console. + console.log('Base64 String - ', base64String); +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.ts b/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.ts new file mode 100644 index 000000000..529d2cbeb --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/index.ts @@ -0,0 +1,59 @@ + +import { Spreadsheet, BeforeSaveEventArgs, SaveCompleteEventArgs } from '@syncfusion/ej2-spreadsheet'; +import { data } from './datasource.ts'; + +let base64String: string | ArrayBuffer; + +let spreadsheet: Spreadsheet = new Spreadsheet({ + openUrl: 'https://services.syncfusion.com/js/production/api/spreadsheet/open', + sheets: [{ + name: 'Car Sales Report', + ranges: [{ dataSource: data }], + columns: [ + { width: 180 }, { width: 130 }, { width: 130 }, { width: 180 }, + { width: 130 }, { width: 120 } + ] + }], + + created: (): void => { + //Applies cell and number formatting to specified range of the active sheet + spreadsheet.cellFormat({ fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' }, 'A1:F1'); + }, + + beforeSave: (args: BeforeSaveEventArgs): void => { + args.needBlobData = true; // To trigger the saveComplete event. + args.isFullPost = false; // Get the spreadsheet data as blob data in the saveComplete event. + }, + + saveComplete: (args: SaveCompleteEventArgs): void => { + // Convert blob data to base64 string. + let reader: FileReader = new FileReader(); + reader.readAsDataURL(args.blobData); + reader.onloadend = function () { + base64String = reader.result ? reader.result : ''; + }; + } + +}); + +spreadsheet.appendTo('#spreadsheet'); + +document.getElementById("import")!.onclick = (): void => { + // Open the file based on saved base64 string. + fetch(base64String as string) + .then((response) => response.blob()) + .then((fileBlob) => { + let file = new File([fileBlob], 'Sample.xlsx'); + spreadsheet.open({ file: file }); + }); +} + +document.getElementById("export")!.onclick = (): void => { + spreadsheet.save({ + url: 'https://services.syncfusion.com/js/production/api/spreadsheet/save', + fileName: 'Worksheet', + saveType: 'Xlsx', + }); // Specifies the save URL, file name, file type need to be saved. + // Logs base64 string into the console. + console.log('Base64 String - ', base64String); +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/js/index.html b/ej2-javascript/code-snippet/spreadsheet/base-64-string/js/index.html new file mode 100644 index 000000000..a6c60b2e6 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/js/index.html @@ -0,0 +1,49 @@ + + + + + EJ2 SpreadSheet + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    + + + + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/styles.css b/ej2-javascript/code-snippet/spreadsheet/base-64-string/styles.css new file mode 100644 index 000000000..49d610a86 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/styles.css @@ -0,0 +1,15 @@ +#container { + visibility: hidden; +} + +#loader { + color: #008cff; + height: 40px; + left: 45%; + position: absolute; + top: 45%; + width: 30%; +} +body { + height: 425px; +} diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/system.config.js b/ej2-javascript/code-snippet/spreadsheet/base-64-string/system.config.js new file mode 100644 index 000000000..f9a88025e --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/system.config.js @@ -0,0 +1,44 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.6/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + //Syncfusion packages mapping + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-notifications": "syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js", + "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js", + "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js", + "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js", + "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js", + "@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js", + "@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js", + "@syncfusion/ej2-spreadsheet": "syncfusion:ej2-spreadsheet/dist/ej2-spreadsheet.umd.min.js" + } +}); + +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/base-64-string/ts/index.html b/ej2-javascript/code-snippet/spreadsheet/base-64-string/ts/index.html new file mode 100644 index 000000000..dde076f41 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/base-64-string/ts/index.html @@ -0,0 +1,39 @@ + + + + + EJ2 SpreadSheet + + + + + + + + + + + + + + + + + + + + + + + + + +
    Loading....
    +
    + + +
    +
    + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/datasource.ts b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/datasource.ts new file mode 100644 index 000000000..7a4fbe571 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/datasource.ts @@ -0,0 +1,688 @@ + +export let data: Object[] = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } +]; + +export let employeeData: Object[] = [ + { + "Employee ID": "5389863", + "Employee Name": "Liuka Tewkesberry", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "08/22/2018", + "Salary": "$32940.53", + "City": "Valencia" + }, + { + "Employee ID": "9141760", + "Employee Name": "Maurine McGreal", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "02/19/2016", + "Salary": "$12769.67", + "City": "Thị Xã Lai Châu" + }, + { + "Employee ID": "0440371", + "Employee Name": "Abby Marcum", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "03/12/2019", + "Salary": "$18565.98", + "City": "Lachute" + }, + { + "Employee ID": "4319060", + "Employee Name": "Colet Dreghorn", + "Gender": "Male", + "Department": "Marketing", + "Date of Joining": "11/02/2018", + "Salary": "$36075.62", + "City": "Cincinnati" + }, + { + "Employee ID": "8524811", + "Employee Name": "Morey Ilyin", + "Gender": "Male", + "Department": "Sales", + "Date of Joining": "07/13/2018", + "Salary": "$19845.66", + "City": "Liudu" + }, + { + "Employee ID": "3536836", + "Employee Name": "Justus Eilert", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "08/30/2016", + "Salary": "$25054.73", + "City": "Kitamilo" + }, + { + "Employee ID": "6035100", + "Employee Name": "Lorelle Whyberd", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "09/16/2010", + "Salary": "$21552.49", + "City": "Qandala" + }, + { + "Employee ID": "9595117", + "Employee Name": "Hans Sponer", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "11/25/2019", + "Salary": "$12751.78", + "City": "Parakou" + }, + { + "Employee ID": "9251706", + "Employee Name": "Esme Beaglehole", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "11/24/2017", + "Salary": "$34244.64", + "City": "Saint-Ambroise" + }, + { + "Employee ID": "5041677", + "Employee Name": "Fernandina Grindrod", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "01/21/2019", + "Salary": "$25722.37", + "City": "Huashi" + }, + { + "Employee ID": "9596007", + "Employee Name": "Glen Lambrechts", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "09/25/2019", + "Salary": "$47190.81", + "City": "Krajan Nglinggis" + }, + { + "Employee ID": "3506310", + "Employee Name": "Judy Crick", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "10/22/2013", + "Salary": "$14168.85", + "City": "Jianchang" + }, + { + "Employee ID": "0283605", + "Employee Name": "Megen McSherry", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "10/19/2016", + "Salary": "$49673.94", + "City": "Talisayan" + }, + { + "Employee ID": "5918336", + "Employee Name": "Aloysius Blunden", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "06/16/2010", + "Salary": "$23992.84", + "City": "Italó" + }, + { + "Employee ID": "0858107", + "Employee Name": "Colene Game", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "10/18/2015", + "Salary": "$21768.47", + "City": "Podbrdo" + }, + { + "Employee ID": "7239057", + "Employee Name": "Bruce Pook", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "08/15/2019", + "Salary": "$46169.78", + "City": "Drawsko" + }, + { + "Employee ID": "2603324", + "Employee Name": "Reggie Gethins", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "05/03/2014", + "Salary": "$48793.33", + "City": "Baiqiao" + }, + { + "Employee ID": "8641019", + "Employee Name": "Happy Terrell", + "Gender": "Female", + "Department": "Product Management", + "Date of Joining": "01/07/2010", + "Salary": "$11971.89", + "City": "Bandar-e Lengeh" + }, + { + "Employee ID": "2229621", + "Employee Name": "Dermot Swithenby", + "Gender": "Male", + "Department": "Business Development", + "Date of Joining": "05/31/2017", + "Salary": "$14627.52", + "City": "Da’an" + }, + { + "Employee ID": "6507226", + "Employee Name": "Dusty Naulls", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "05/17/2012", + "Salary": "$49569.60", + "City": "Kelowna" + }, + { + "Employee ID": "9588238", + "Employee Name": "Boycey Gemlbett", + "Gender": "Male", + "Department": "Accounting", + "Date of Joining": "08/19/2014", + "Salary": "$11400.60", + "City": "Quezon" + }, + { + "Employee ID": "4783061", + "Employee Name": "Gregoire Craik", + "Gender": "Male", + "Department": "Support", + "Date of Joining": "01/07/2015", + "Salary": "$28536.96", + "City": "Sacramento" + }, + { + "Employee ID": "1086662", + "Employee Name": "Paquito Keetch", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "07/20/2017", + "Salary": "$10948.94", + "City": "Xieshui" + }, + { + "Employee ID": "7111790", + "Employee Name": "Siouxie Lippini", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "02/08/2012", + "Salary": "$42688.51", + "City": "Bigoudine" + }, + { + "Employee ID": "9189124", + "Employee Name": "Valerye Russell", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "07/17/2012", + "Salary": "$32651.96", + "City": "Pichilemu" + }, + { + "Employee ID": "6015219", + "Employee Name": "Patience Ludman", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "09/25/2018", + "Salary": "$17589.61", + "City": "Binjiang" + }, + { + "Employee ID": "5210163", + "Employee Name": "Helene Borsay", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "01/19/2018", + "Salary": "$34017.42", + "City": "Chengkan" + }, + { + "Employee ID": "6656266", + "Employee Name": "Garrek Fatharly", + "Gender": "Male", + "Department": "Business Development", + "Date of Joining": "08/22/2018", + "Salary": "$49775.81", + "City": "San Antonio Oeste" + }, + { + "Employee ID": "8740096", + "Employee Name": "Fulton Culverhouse", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "01/11/2014", + "Salary": "$36633.61", + "City": "Borlänge" + }, + { + "Employee ID": "7875847", + "Employee Name": "Lavena Yandle", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "08/31/2016", + "Salary": "$25835.58", + "City": "Borino" + }, + { + "Employee ID": "8436792", + "Employee Name": "Sophia Cowwell", + "Gender": "Female", + "Department": "Product Management", + "Date of Joining": "08/06/2011", + "Salary": "$46836.53", + "City": "Fécamp" + }, + { + "Employee ID": "2789522", + "Employee Name": "Dode Bowmen", + "Gender": "Female", + "Department": "Sales", + "Date of Joining": "02/21/2010", + "Salary": "$27575.10", + "City": "Karangwaru" + }, + { + "Employee ID": "2816501", + "Employee Name": "Peggi Grishelyov", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "12/08/2012", + "Salary": "$41712.59", + "City": "San Antonio" + }, + { + "Employee ID": "5648843", + "Employee Name": "Ailsun Porker", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "11/23/2016", + "Salary": "$46533.06", + "City": "Mayisyan" + }, + { + "Employee ID": "3645602", + "Employee Name": "Licha McKee", + "Gender": "Female", + "Department": "Research and Development", + "Date of Joining": "08/29/2018", + "Salary": "$31008.69", + "City": "Wenqiao" + }, + { + "Employee ID": "7413262", + "Employee Name": "Ives Tunn", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "08/31/2018", + "Salary": "$27791.30", + "City": "Tabia" + }, + { + "Employee ID": "9348082", + "Employee Name": "Cathy Bugdale", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "04/23/2016", + "Salary": "$31759.16", + "City": "Azul" + }, + { + "Employee ID": "7109150", + "Employee Name": "Waverley Gingedale", + "Gender": "Male", + "Department": "Accounting", + "Date of Joining": "09/04/2011", + "Salary": "$27893.84", + "City": "Frýdek-Místek" + }, + { + "Employee ID": "1119404", + "Employee Name": "Cooper Capes", + "Gender": "Male", + "Department": "Sales", + "Date of Joining": "01/02/2016", + "Salary": "$26407.41", + "City": "Ash Sharyah" + }, + { + "Employee ID": "9560117", + "Employee Name": "Shayna Potebury", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "10/23/2012", + "Salary": "$35332.31", + "City": "Baluk" + }, + { + "Employee ID": "2598799", + "Employee Name": "Doro Gaitone", + "Gender": "Female", + "Department": "Sales", + "Date of Joining": "02/04/2012", + "Salary": "$22904.55", + "City": "Wulingyuan" + }, + { + "Employee ID": "6767113", + "Employee Name": "Chantal Ventam", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "07/02/2014", + "Salary": "$25515.12", + "City": "Xinshui" + }, + { + "Employee ID": "3735396", + "Employee Name": "Tobie Brodeur", + "Gender": "Male", + "Department": "Training", + "Date of Joining": "08/11/2015", + "Salary": "$24508.84", + "City": "Xin’an" + }, + { + "Employee ID": "2942841", + "Employee Name": "Feodor MacDermid", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "06/02/2019", + "Salary": "$14844.80", + "City": "Rantauambacang" + }, + { + "Employee ID": "1511001", + "Employee Name": "Allyce Decker", + "Gender": "Female", + "Department": "Support", + "Date of Joining": "04/14/2017", + "Salary": "$39356.65", + "City": "Saint Paul" + }, + { + "Employee ID": "9062663", + "Employee Name": "Ricard Connock", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "11/25/2010", + "Salary": "$27421.61", + "City": "Lokorae" + }, + { + "Employee ID": "6210073", + "Employee Name": "Minerva Greenham", + "Gender": "Female", + "Department": "Support", + "Date of Joining": "05/23/2014", + "Salary": "$48300.27", + "City": "Pakemitan" + }, + { + "Employee ID": "1830385", + "Employee Name": "Cyb Gallant", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "11/25/2010", + "Salary": "$36518.72", + "City": "Berëzovyy" + }, + { + "Employee ID": "7466629", + "Employee Name": "Harman Free", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "07/15/2012", + "Salary": "$35939.87", + "City": "Watodei" + }, + { + "Employee ID": "2963633", + "Employee Name": "Kylie Phettis", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "03/18/2011", + "Salary": "$26038.56", + "City": "Huangzhai" + } +]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/es5-datasource.js b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/es5-datasource.js new file mode 100644 index 000000000..82b91d703 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/es5-datasource.js @@ -0,0 +1,687 @@ +var data = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } +]; + +var employeeData = [ + { + "Employee ID": "5389863", + "Employee Name": "Liuka Tewkesberry", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "08/22/2018", + "Salary": "$32940.53", + "City": "Valencia" + }, + { + "Employee ID": "9141760", + "Employee Name": "Maurine McGreal", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "02/19/2016", + "Salary": "$12769.67", + "City": "Thị Xã Lai Châu" + }, + { + "Employee ID": "0440371", + "Employee Name": "Abby Marcum", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "03/12/2019", + "Salary": "$18565.98", + "City": "Lachute" + }, + { + "Employee ID": "4319060", + "Employee Name": "Colet Dreghorn", + "Gender": "Male", + "Department": "Marketing", + "Date of Joining": "11/02/2018", + "Salary": "$36075.62", + "City": "Cincinnati" + }, + { + "Employee ID": "8524811", + "Employee Name": "Morey Ilyin", + "Gender": "Male", + "Department": "Sales", + "Date of Joining": "07/13/2018", + "Salary": "$19845.66", + "City": "Liudu" + }, + { + "Employee ID": "3536836", + "Employee Name": "Justus Eilert", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "08/30/2016", + "Salary": "$25054.73", + "City": "Kitamilo" + }, + { + "Employee ID": "6035100", + "Employee Name": "Lorelle Whyberd", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "09/16/2010", + "Salary": "$21552.49", + "City": "Qandala" + }, + { + "Employee ID": "9595117", + "Employee Name": "Hans Sponer", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "11/25/2019", + "Salary": "$12751.78", + "City": "Parakou" + }, + { + "Employee ID": "9251706", + "Employee Name": "Esme Beaglehole", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "11/24/2017", + "Salary": "$34244.64", + "City": "Saint-Ambroise" + }, + { + "Employee ID": "5041677", + "Employee Name": "Fernandina Grindrod", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "01/21/2019", + "Salary": "$25722.37", + "City": "Huashi" + }, + { + "Employee ID": "9596007", + "Employee Name": "Glen Lambrechts", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "09/25/2019", + "Salary": "$47190.81", + "City": "Krajan Nglinggis" + }, + { + "Employee ID": "3506310", + "Employee Name": "Judy Crick", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "10/22/2013", + "Salary": "$14168.85", + "City": "Jianchang" + }, + { + "Employee ID": "0283605", + "Employee Name": "Megen McSherry", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "10/19/2016", + "Salary": "$49673.94", + "City": "Talisayan" + }, + { + "Employee ID": "5918336", + "Employee Name": "Aloysius Blunden", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "06/16/2010", + "Salary": "$23992.84", + "City": "Italó" + }, + { + "Employee ID": "0858107", + "Employee Name": "Colene Game", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "10/18/2015", + "Salary": "$21768.47", + "City": "Podbrdo" + }, + { + "Employee ID": "7239057", + "Employee Name": "Bruce Pook", + "Gender": "Male", + "Department": "Services", + "Date of Joining": "08/15/2019", + "Salary": "$46169.78", + "City": "Drawsko" + }, + { + "Employee ID": "2603324", + "Employee Name": "Reggie Gethins", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "05/03/2014", + "Salary": "$48793.33", + "City": "Baiqiao" + }, + { + "Employee ID": "8641019", + "Employee Name": "Happy Terrell", + "Gender": "Female", + "Department": "Product Management", + "Date of Joining": "01/07/2010", + "Salary": "$11971.89", + "City": "Bandar-e Lengeh" + }, + { + "Employee ID": "2229621", + "Employee Name": "Dermot Swithenby", + "Gender": "Male", + "Department": "Business Development", + "Date of Joining": "05/31/2017", + "Salary": "$14627.52", + "City": "Da’an" + }, + { + "Employee ID": "6507226", + "Employee Name": "Dusty Naulls", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "05/17/2012", + "Salary": "$49569.60", + "City": "Kelowna" + }, + { + "Employee ID": "9588238", + "Employee Name": "Boycey Gemlbett", + "Gender": "Male", + "Department": "Accounting", + "Date of Joining": "08/19/2014", + "Salary": "$11400.60", + "City": "Quezon" + }, + { + "Employee ID": "4783061", + "Employee Name": "Gregoire Craik", + "Gender": "Male", + "Department": "Support", + "Date of Joining": "01/07/2015", + "Salary": "$28536.96", + "City": "Sacramento" + }, + { + "Employee ID": "1086662", + "Employee Name": "Paquito Keetch", + "Gender": "Male", + "Department": "Legal", + "Date of Joining": "07/20/2017", + "Salary": "$10948.94", + "City": "Xieshui" + }, + { + "Employee ID": "7111790", + "Employee Name": "Siouxie Lippini", + "Gender": "Female", + "Department": "Engineering", + "Date of Joining": "02/08/2012", + "Salary": "$42688.51", + "City": "Bigoudine" + }, + { + "Employee ID": "9189124", + "Employee Name": "Valerye Russell", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "07/17/2012", + "Salary": "$32651.96", + "City": "Pichilemu" + }, + { + "Employee ID": "6015219", + "Employee Name": "Patience Ludman", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "09/25/2018", + "Salary": "$17589.61", + "City": "Binjiang" + }, + { + "Employee ID": "5210163", + "Employee Name": "Helene Borsay", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "01/19/2018", + "Salary": "$34017.42", + "City": "Chengkan" + }, + { + "Employee ID": "6656266", + "Employee Name": "Garrek Fatharly", + "Gender": "Male", + "Department": "Business Development", + "Date of Joining": "08/22/2018", + "Salary": "$49775.81", + "City": "San Antonio Oeste" + }, + { + "Employee ID": "8740096", + "Employee Name": "Fulton Culverhouse", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "01/11/2014", + "Salary": "$36633.61", + "City": "Borlänge" + }, + { + "Employee ID": "7875847", + "Employee Name": "Lavena Yandle", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "08/31/2016", + "Salary": "$25835.58", + "City": "Borino" + }, + { + "Employee ID": "8436792", + "Employee Name": "Sophia Cowwell", + "Gender": "Female", + "Department": "Product Management", + "Date of Joining": "08/06/2011", + "Salary": "$46836.53", + "City": "Fécamp" + }, + { + "Employee ID": "2789522", + "Employee Name": "Dode Bowmen", + "Gender": "Female", + "Department": "Sales", + "Date of Joining": "02/21/2010", + "Salary": "$27575.10", + "City": "Karangwaru" + }, + { + "Employee ID": "2816501", + "Employee Name": "Peggi Grishelyov", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "12/08/2012", + "Salary": "$41712.59", + "City": "San Antonio" + }, + { + "Employee ID": "5648843", + "Employee Name": "Ailsun Porker", + "Gender": "Female", + "Department": "Services", + "Date of Joining": "11/23/2016", + "Salary": "$46533.06", + "City": "Mayisyan" + }, + { + "Employee ID": "3645602", + "Employee Name": "Licha McKee", + "Gender": "Female", + "Department": "Research and Development", + "Date of Joining": "08/29/2018", + "Salary": "$31008.69", + "City": "Wenqiao" + }, + { + "Employee ID": "7413262", + "Employee Name": "Ives Tunn", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "08/31/2018", + "Salary": "$27791.30", + "City": "Tabia" + }, + { + "Employee ID": "9348082", + "Employee Name": "Cathy Bugdale", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "04/23/2016", + "Salary": "$31759.16", + "City": "Azul" + }, + { + "Employee ID": "7109150", + "Employee Name": "Waverley Gingedale", + "Gender": "Male", + "Department": "Accounting", + "Date of Joining": "09/04/2011", + "Salary": "$27893.84", + "City": "Frýdek-Místek" + }, + { + "Employee ID": "1119404", + "Employee Name": "Cooper Capes", + "Gender": "Male", + "Department": "Sales", + "Date of Joining": "01/02/2016", + "Salary": "$26407.41", + "City": "Ash Sharyah" + }, + { + "Employee ID": "9560117", + "Employee Name": "Shayna Potebury", + "Gender": "Female", + "Department": "Human Resources", + "Date of Joining": "10/23/2012", + "Salary": "$35332.31", + "City": "Baluk" + }, + { + "Employee ID": "2598799", + "Employee Name": "Doro Gaitone", + "Gender": "Female", + "Department": "Sales", + "Date of Joining": "02/04/2012", + "Salary": "$22904.55", + "City": "Wulingyuan" + }, + { + "Employee ID": "6767113", + "Employee Name": "Chantal Ventam", + "Gender": "Female", + "Department": "Training", + "Date of Joining": "07/02/2014", + "Salary": "$25515.12", + "City": "Xinshui" + }, + { + "Employee ID": "3735396", + "Employee Name": "Tobie Brodeur", + "Gender": "Male", + "Department": "Training", + "Date of Joining": "08/11/2015", + "Salary": "$24508.84", + "City": "Xin’an" + }, + { + "Employee ID": "2942841", + "Employee Name": "Feodor MacDermid", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "06/02/2019", + "Salary": "$14844.80", + "City": "Rantauambacang" + }, + { + "Employee ID": "1511001", + "Employee Name": "Allyce Decker", + "Gender": "Female", + "Department": "Support", + "Date of Joining": "04/14/2017", + "Salary": "$39356.65", + "City": "Saint Paul" + }, + { + "Employee ID": "9062663", + "Employee Name": "Ricard Connock", + "Gender": "Male", + "Department": "Product Management", + "Date of Joining": "11/25/2010", + "Salary": "$27421.61", + "City": "Lokorae" + }, + { + "Employee ID": "6210073", + "Employee Name": "Minerva Greenham", + "Gender": "Female", + "Department": "Support", + "Date of Joining": "05/23/2014", + "Salary": "$48300.27", + "City": "Pakemitan" + }, + { + "Employee ID": "1830385", + "Employee Name": "Cyb Gallant", + "Gender": "Female", + "Department": "Accounting", + "Date of Joining": "11/25/2010", + "Salary": "$36518.72", + "City": "Berëzovyy" + }, + { + "Employee ID": "7466629", + "Employee Name": "Harman Free", + "Gender": "Male", + "Department": "Human Resources", + "Date of Joining": "07/15/2012", + "Salary": "$35939.87", + "City": "Watodei" + }, + { + "Employee ID": "2963633", + "Employee Name": "Kylie Phettis", + "Gender": "Female", + "Department": "Marketing", + "Date of Joining": "03/18/2011", + "Salary": "$26038.56", + "City": "Huangzhai" + } +]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.js b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.js new file mode 100644 index 000000000..727763614 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.js @@ -0,0 +1,43 @@ +// Initialize the Spreadsheet component. + +var columns = [ + { width: 180 }, { width: 130 }, { width: 130 }, + { width: 180 }, { width: 130 }, { width: 120 } +]; + +var sheet = [{ + name: 'Car Sales Report', + ranges: [{ dataSource: data }], + columns: columns +}] + +var spreadsheet = new ej.spreadsheet.Spreadsheet({ + sheets: sheet +}); + +// Render initialized Spreadsheet. +spreadsheet.appendTo('#spreadsheet'); + +document.getElementById("insertSheet").onclick = () => { + spreadsheet.insertSheet( + [ + { + index: 1, + name: 'new_sheet', + ranges: [ + { + dataSource: employeeData, + startCell: 'A1' + }, + ], + columns: columns, + }, + ] + ); + // Use the timeout function to wait until the sheet is inserted. + setTimeout(() => { + // Method for switching to a new sheet. + spreadsheet.goTo('new_sheet!A1'); + }) +}; + diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.ts b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.ts new file mode 100644 index 000000000..908a73a18 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.ts @@ -0,0 +1,48 @@ + +import { Spreadsheet, SheetModel, ColumnModel } from '@syncfusion/ej2-spreadsheet'; +import { data, employeeData } from './datasource.ts'; +import { enableRipple } from '@syncfusion/ej2-base'; + +enableRipple(true); + +let columns: ColumnModel[] = [ + { width: 180 }, { width: 130 }, { width: 130 }, + { width: 180 }, { width: 130 }, { width: 120 } +]; + +let sheets: SheetModel[] = [{ + name: 'Car Sales Report', + ranges: [{ dataSource: data }], + columns: columns +}]; + +let spreadsheet: Spreadsheet = new Spreadsheet({ + sheets: sheets, +}); + +spreadsheet.appendTo('#spreadsheet'); + +document.getElementById("insertSheet")!.onclick = () => { + spreadsheet.insertSheet( + [ + { + index: 1, + name: 'new_sheet', + ranges: [ + { + dataSource: employeeData, + startCell: 'A1' + }, + ], + columns: columns, + }, + ] + ); + // Use the timeout function to wait until the sheet is inserted. + setTimeout(() => { + // Method for switching to a new sheet. + spreadsheet.goTo('new_sheet!A1'); + }) +}; + + diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/js/index.html b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/js/index.html new file mode 100644 index 000000000..9f9848f44 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/js/index.html @@ -0,0 +1,48 @@ + + + + + EJ2 SpreadSheet + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/styles.css b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/styles.css new file mode 100644 index 000000000..49d610a86 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/styles.css @@ -0,0 +1,15 @@ +#container { + visibility: hidden; +} + +#loader { + color: #008cff; + height: 40px; + left: 45%; + position: absolute; + top: 45%; + width: 30%; +} +body { + height: 425px; +} diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/system.config.js b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/system.config.js new file mode 100644 index 000000000..f9a88025e --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/system.config.js @@ -0,0 +1,44 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.6/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + //Syncfusion packages mapping + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-notifications": "syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js", + "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js", + "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js", + "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js", + "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js", + "@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js", + "@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js", + "@syncfusion/ej2-spreadsheet": "syncfusion:ej2-spreadsheet/dist/ej2-spreadsheet.umd.min.js" + } +}); + +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/ts/index.html b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/ts/index.html new file mode 100644 index 000000000..adb291ac2 --- /dev/null +++ b/ej2-javascript/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/ts/index.html @@ -0,0 +1,38 @@ + + + + + EJ2 SpreadSheet + + + + + + + + + + + + + + + + + + + + + + + + + +
    Loading....
    +
    + +
    +
    + + + \ No newline at end of file diff --git a/ej2-javascript/data/adaptors.md b/ej2-javascript/data/adaptors.md index 64e59f5b1..7c8e49b39 100644 --- a/ej2-javascript/data/adaptors.md +++ b/ej2-javascript/data/adaptors.md @@ -80,9 +80,9 @@ The sample response object should be as follows, } ``` -## OData adaptor +## ODataV4 adaptor -[OData](http://www.odata.org/documentation/odata-version-3-0/) is standardized protocol for creating and consuming data. You can retrieve data from OData service using **DataManager**. The `ODataAdaptor` helps you to interact with OData service. You can refer to the following code example of remote Data binding using OData service. +[OData](http://www.odata.org/documentation/odata-version-3-0/) is standardized protocol for creating and consuming data. You can retrieve data from OData service using **DataManager**. The `ODataV4Adaptor` helps you to interact with OData service. You can refer to the following code example of remote Data binding using OData service. {% if page.publishingplatform == "typescript" %} @@ -487,7 +487,7 @@ To create and use custom adaptor, please refer to the below steps. * Override the desired method to achieve your requirement. * Assign the custom adaptor to the `adaptor` property of **DataManager**. -For the sake of demonstrating custom adaptor approach, we are going to see how to add serial number for the records by overriding the built-in response processing using `processResponse` method of the `ODataAdaptor`. +For the sake of demonstrating custom adaptor approach, we are going to see how to add serial number for the records by overriding the built-in response processing using `processResponse` method of the `ODataV4Adaptor`. {% if page.publishingplatform == "typescript" %} diff --git a/ej2-javascript/data/how-to.md b/ej2-javascript/data/how-to.md index 025f6a969..43787de4b 100644 --- a/ej2-javascript/data/how-to.md +++ b/ej2-javascript/data/how-to.md @@ -80,11 +80,11 @@ You can use the [`addParams`](../api/data/query/#addparams) method of [`Query`]( You can add custom headers to the request made by **DataManager** using the `headers` property. ```ts -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor, headers:[{ 'syncfusion': 'true' }] }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor, headers:[{ 'syncfusion': 'true' }] }) .executeQuery(new Query()) .then((e: ReturnOption) => { //get result from e.result diff --git a/ej2-javascript/grid/row/detail-template.md b/ej2-javascript/grid/row/detail-template.md index 52b7c96a3..aca753123 100644 --- a/ej2-javascript/grid/row/detail-template.md +++ b/ej2-javascript/grid/row/detail-template.md @@ -11,9 +11,9 @@ domainurl: ##DomainURL## # Detail template in ##Platform_Name## Grid control -The detail template provides additional information about a particular row by expanding or collapsing detail content. The [`detailTemplate`](../../api/grid/#detailtemplate) property accepts either the [template string](../../common/template-engine) or HTML element ID. +The detail template in the Grid control allows you to display additional information about a specific row in the grid by expanding or collapsing detail content. This feature is useful when you need to show additional data or custom content that is specific to each row in the grid. You can use the [detailTemplate](../../api/grid/#detailtemplate) property to define an HTML template for the detail row. This template can include any HTML element or ##Platform_Name## control that you want to display as detail content. -To use detail template, inject the [`DetailRow`](../../api/grid/detailRow)) module in the grid. +Here's an example of using the `detailTemplate` property in the grid control: {% if page.publishingplatform == "typescript" %} @@ -42,11 +42,15 @@ To use detail template, inject the [`DetailRow`](../../api/grid/detailRow)) modu {% previewsample "page.domainurl/code-snippet/grid/detail-template-cs1" %} {% endif %} -## Rendering custom component +## Rendering custom control -To render the custom component inside the detail row, define the template in the [`detailTemplate`](../../api/grid/#detailtemplate) and render the component in the [`detailDataBound`](../../api/grid/#detaildatabound-emittypedetaildataboundeventargs) event. +The Grid control provides a powerful feature that allows you to render custom controls inside the detail row. This feature is helpful when you need to add additional information or functionality for a specific row in the grid. -For example, to render grid inside the detail row, place an HTML div element as the [`detailTemplate`](../../api/grid/#detailtemplate) and render the DIV element as grid component in the [`detailDataBound`](../../api/grid/#detaildatabound-emittypedetaildataboundeventargs) event. +To render a custom control inside the detail row, you need to define a template using the [detailTemplate](../../api/grid/#detailtemplate) property and handle the [detailDataBound](,../../api/grid/#detaildatabound) event. This template can include any HTML element or ##Platform_Name## control that you want to display as the detail content. + +The `detailDataBound` event is an event that is triggered after a detail row is bound to data. This event provides an object of type [DetailDataBoundEventArgs](../../api/grid/#detaildataboundeventargs) as a parameter. + +For example, to render grid inside the detail row, place an HTML div element as the `detailTemplate` and render the DIV element as grid control in the `detailDataBound` event. {% if page.publishingplatform == "typescript" %} @@ -77,7 +81,10 @@ For example, to render grid inside the detail row, place an HTML div element as ## Expand by external button -By default, detail rows render in collapsed state. You can expand a detail row by invoking the [`expand`](../../api/grid/detailRow/#expand) method using the external button. +The Grid provides a feature that allows users to expand the detail row of a grid using an external button. By default, detail rows render in a collapsed state, but this feature enables users to view additional details associated with a particular row. + +To achieve expanding the detail row of a grid using an external button, you need to invoke the [expand](../../api/grid/detailRow/#expand) method provided by the **detailRowModule** object of the Syncfusion Grid library. This method will expand the detail row of a specific grid row. +Here is an example of how to use the `expand` method to expand a detail row: {% if page.publishingplatform == "typescript" %} @@ -106,10 +113,52 @@ By default, detail rows render in collapsed state. You can expand a detail row b {% previewsample "page.domainurl/code-snippet/grid/detail-template-method-cs1" %} {% endif %} -> * You can expand all the rows by using [`expandAll`](../../api/grid/detailRow/#expandall) method. -> * If you want to expand all the rows at initial Grid rendering, then use [`expandAll`](../../api/grid/detailRow/#expandall) method in [`dataBound`](../../api/grid/#databound) event of the Grid. +## Customize detail template icon + +The detail template icon in the Syncfusion Grid is used to expand or collapse the detail content of a row. By default, the icon represents a right arrow for the collapsed state and a down arrow for the expanded state. If you want to customize this icon, you can achieve it by overriding the following CSS styles: + +```css + +.e-grid .e-icon-grightarrow::before { + content: '\e300'; +} + +.e-grid .e-icon-gdownarrow::before { + content: '\e304'; +} + +``` + +Here is an example of how to customize the detail template icon: + +{% if page.publishingplatform == "typescript" %} + + {% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/grid/detail-template-icon-cs1/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/grid/detail-template-icon-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/grid/detail-template-icon-cs1" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/grid/detail-template-icon-cs1/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/grid/detail-template-icon-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/grid/detail-template-icon-cs1" %} +{% endif %} -## Limitations for detail template +## Limitations Detail template is not supported with the following features: @@ -123,4 +172,3 @@ Detail template is not supported with the following features: * Column spanning * Lazy load grouping * State persistence -* Hierarchy Grid \ No newline at end of file diff --git a/ej2-javascript/grid/row/row-drag-and-drop.md b/ej2-javascript/grid/row/row-drag-and-drop.md index 2deaa2b09..c363f5841 100644 --- a/ej2-javascript/grid/row/row-drag-and-drop.md +++ b/ej2-javascript/grid/row/row-drag-and-drop.md @@ -11,77 +11,86 @@ domainurl: ##DomainURL## # Row drag and drop in ##Platform_Name## Grid control -The grid row drag and drop allows you to drag and drop grid rows to another grid or custom component. To enable row drag and drop, set the [`allowRowDragAndDrop`](../../api/grid/#allowrowdraganddrop) to true. The target component where the grid rows are to be dropped can be set by using the [`targetID`](../../api/grid/rowDropSettings/#targetid). +The Syncfusion ##Platform_Name## Grid control provides built-in support for row drag and drop functionality. This feature allows you to easily rearrange rows within the grid by dragging and dropping them to new positions. Additionally, you can also drag and drop rows from one grid to another grid, as well as drag and drop rows to custom controls. -To use row drag and drop, inject the **RowDD** module in the grid. +To use the row drag and drop feature in Grid control, you need to inject the **RowDD** module in the grid. The **RowDD** is responsible for handling the row drag and drop functionality in the grid control. Once you have injected the **RowDD**, you can then use the [allowRowDragAndDrop](../../api/grid/#allowrowdraganddrop) and [targetID](../../api/grid/rowDropSettings/#targetid) properties to enable and configure the row drag and drop feature in the Grid. + +## Drag and drop within grid + +The drag and drop feature allows you to rearrange rows within the grid by dragging them using a drag icon. This feature can be enabled by setting the [allowRowDragAndDrop](../../api/grid/#allowrowdraganddrop) property to **true**. This property is a boolean value that determines whether row drag and drop is enabled or not. By default, it is set to **false**, which means that row drag and drop is disabled. + +Here's an example of how to enable drag and drop within the Grid: {% if page.publishingplatform == "typescript" %} {% tabs %} {% highlight ts tabtitle="index.ts" %} -{% include code-snippet/grid/draganddrop-cs1/index.ts %} +{% include code-snippet/grid/draganddrop-single-cs1/index.ts %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-cs1/index.html %} +{% include code-snippet/grid/draganddrop-single-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs1" %} {% elsif page.publishingplatform == "javascript" %} {% tabs %} {% highlight js tabtitle="index.js" %} -{% include code-snippet/grid/draganddrop-cs1/index.js %} +{% include code-snippet/grid/draganddrop-single-cs1/index.js %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-cs1/index.html %} +{% include code-snippet/grid/draganddrop-single-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs1" %} {% endif %} -> * Selection feature must be enabled for row drag and drop. -> * Multiple rows can be selected by clicking and dragging inside the grid. -For multiple row selection, the [`type`](../../api/grid/selectionSettings/#type) property must be set to **multiple**. +## Drag and drop to grid + +The grid row drag and drop allows you to drag grid rows and drop to another grid. This feature can be enabled by setting the [allowRowDragAndDrop](../../api/grid/#allowrowdraganddrop) property to **true** in the Grid control. This property specifies whether to enable or disable the row drag and drop feature in the Grid. By default, this property is set to **false**, which means that row drag and drop functionality is not enabled. -## Drag and drop within Grid +To specify the target control where the grid rows should be dropped, use the [targetID](../../api/grid/rowDropSettings/#targetid) property of the [rowDropSettings](../../api/grid/rowDropSettings/) object. The `targetID` property takes the ID of the target control as its value. -The grid row drag and drop allows you to drag and drop grid rows on the same grid using drag icon. To enable row drag and drop, set the [`allowRowDragAndDrop`](../../api/grid/#allowrowdraganddrop) to true. +Here's an example code snippet that demonstrates how to enable Row drag and drop another Grid control: {% if page.publishingplatform == "typescript" %} {% tabs %} {% highlight ts tabtitle="index.ts" %} -{% include code-snippet/grid/draganddrop-single-cs1/index.ts %} +{% include code-snippet/grid/draganddrop-cs1/index.ts %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-cs1/index.html %} +{% include code-snippet/grid/draganddrop-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-cs1" %} {% elsif page.publishingplatform == "javascript" %} {% tabs %} {% highlight js tabtitle="index.js" %} -{% include code-snippet/grid/draganddrop-single-cs1/index.js %} +{% include code-snippet/grid/draganddrop-cs1/index.js %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-cs1/index.html %} +{% include code-snippet/grid/draganddrop-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-cs1" %} {% endif %} -## Drag and drop to custom component +> * The row drag and drop feature is not supported in virtual scrolling and frozen rows and columns mode. +> * In order to use row drag and drop, you need to inject the **RowDD** module in the grid. + +## Drag and drop to custom control -You can drag and drop the grid rows to any custom component. To enable row drag and drop, set the [`allowRowDragAndDrop`](../../api/grid/#allowrowdraganddrop) as true and define the custom component id in [`targetID`](../../api/grid/rowDropSettings/#targetid) property of rowDropSettings. +The Grid provides the feature to drag and drop grid rows to any custom control. This feature allows you to easily move rows from one control to another without having to manually copy and paste data. To enable row drag and drop, you need to set the [allowRowDragAndDrop](../../api/grid/#allowrowdraganddrop) property to **true** and defining the custom control ID in the [targetID](../../api/grid/rowDropSettings/#targetid) property of the `rowDropSettings` object. The ID provided in `targetID` should correspond to the ID of the target control where the rows are to be dropped. -In the below example, the selected grid row is dragged and dropped in to the TreeView component by using [`rowDrop`](../../api/grid/#rowdrop) event. Once the row is dropped into the TreeView component, we have removed the corresponding grid row from grid and its data inserted in custom component. To know more information about the drag and drop events check [`here`](https://ej2.syncfusion.com/documentation/grid/row/?no-cache=1#drag-and-drop-events). +In the below example, the selected grid row is dragged and dropped in to the TreeGrid control by using [rowDrop](../../api/grid/#rowdrop) event. Once the row is dropped into the TreeGrid control, we have removed the corresponding grid row from grid and its data inserted in custom control. {% if page.publishingplatform == "typescript" %} @@ -110,95 +119,91 @@ In the below example, the selected grid row is dragged and dropped in to the Tre {% previewsample "page.domainurl/code-snippet/grid/draganddrop-custom-cs1" %} {% endif %} -## Drag and drop with sorting and filtering +> * The `rowDrop` event is fired when a row is dropped onto a custom control, regardless of whether the drop is successful or not. You can use the `args.cancel` property to prevent the default action. + +## Drag and drop rows without drag icon + +By default, when performing a drag and drop operation in the Syncfusion Grid, drag icons are displayed. However, in some cases, you may want to hide these drag icons. This can be achieved by setting the [targetID](../../api/grid/rowDropSettings/#targetid) property of the [rowDropSettings](../../api/grid/rowDropSettings/) object to the current Grid's ID. -In the following demo, you can achieve the grid row drag and drop support with filtering and sorting using [`rowDrop`](../../api/grid/rowDragEventArgs) event. +By setting the `targetID`, the Grid will render without a helper icon for row dragging. You can then customize the drag and drop action by binding to the [rowDrop](../../api/grid/#rowdrop) event of the Grid. In the `rowDrop` event, you can prevent the default action by setting `args.cancel` to **true**, and reorder the rows using the [reorderRows](../../api/grid/#reorderrows) method of the Grid. + +Here's an example of how to hide the drag and drop icon in the Syncfusion Grid: {% if page.publishingplatform == "typescript" %} {% tabs %} {% highlight ts tabtitle="index.ts" %} -{% include code-snippet/grid/draganddrop-single-filter-sort-cs1/index.ts %} +{% include code-snippet/grid/draganddrop-single-cs2/index.ts %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-filter-sort-cs1/index.html %} +{% include code-snippet/grid/draganddrop-single-cs2/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-filter-sort-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs2" %} {% elsif page.publishingplatform == "javascript" %} {% tabs %} {% highlight js tabtitle="index.js" %} -{% include code-snippet/grid/draganddrop-single-filter-sort-cs1/index.js %} +{% include code-snippet/grid/draganddrop-single-cs2/index.js %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-filter-sort-cs1/index.html %} +{% include code-snippet/grid/draganddrop-single-cs2/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-filter-sort-cs1" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs2" %} {% endif %} -> * You can enable/disable the drag icon by using **disableRowDD** method which is achieved in the [`actionComplete`](../../api/grid/actionEventArgs) event. - -```ts - actionComplete: function (args) { - if (this.filterSettings.columns.length) { - this.disableRowDD(true); - } - else { - this.disableRowDD(false); - } - } - -``` +> * The selection feature must be enabled in the Grid to allow users to select rows before performing the drag and drop operation. +> * Multiple rows can be selected by clicking and dragging inside the grid. For multiple row selection, the [type](../../api/grid/selectionSettings/#type) property must be set to **Multiple**. ## Drag and drop events -The following events are triggered while drag and drop the grid rows. +The Grid control provides a set of events that are triggered during drag and drop operations on grid rows. These events allow you to customize the drag element, track the progress of the dragging operation, and perform actions when a row is dropped on a target element. The following events are available: -[`rowDragStartHelper`](../../api/grid/#rowdragstarthelper) - Triggers when click the drag icon or grid row and this event is used to customize the drag element based on user criteria.
    -[`rowDragStart`](../../api/grid/#rowdragstart) -Triggers when starts to drag the grid row.
    -[`rowDrag`](../../api/grid/#rowdrag) - Triggers while dragging the grid row.
    -[`rowDrop`](../../api/grid/#rowdrop) - Triggers when a drag element is dropped on the target element.
    +1. [rowDragStartHelper](../../api/grid/#rowdragstarthelper): This event is triggered when a click occurs on the drag icon or a grid row. It allows you to customize the drag element based on specific criteria. -## Drag and drop rows without drag icon +2. [rowDragStart](../../api/grid/#rowdragstart): This event is triggered when the dragging of a grid row starts. -You can hide the drag and drop icon when performing a drag and drop operation within the grid. This can be achieved by setting the [targetID](../../api/grid/rowDropSettings/#targetid) of the [rowDropSettings](../../api/grid/rowDropSettings/) as the current Grid’s ID. +3. [rowDrag](../../api/grid/#rowdrag): This event is triggered continuously while the grid row is being dragged. -By setting the [targetID](../../api/grid/rowDropSettings/#targetid), the Grid will render without a helper icon (for row drag). Now you can customize the drag and drop action. To control the drop action, you can bind the [rowDrop](../../api/grid/#rowdrop) event of the Grid. In the [rowDrop](../../api/grid/#rowdrop) event, you can prevent the default action(args.cancel as true) and reorder the rows using [reorderRows](../../api/grid/#reorderrows) method of the Grid. +4. [rowDrop](../../api/grid/#rowdrop): This event is triggered when a drag element is dropped onto a target element. {% if page.publishingplatform == "typescript" %} {% tabs %} {% highlight ts tabtitle="index.ts" %} -{% include code-snippet/grid/draganddrop-single-cs2/index.ts %} +{% include code-snippet/grid/draganddrop-event-cs1/index.ts %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-cs2/index.html %} +{% include code-snippet/grid/draganddrop-event-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs2" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-event-cs1" %} {% elsif page.publishingplatform == "javascript" %} {% tabs %} {% highlight js tabtitle="index.js" %} -{% include code-snippet/grid/draganddrop-single-cs2/index.js %} +{% include code-snippet/grid/draganddrop-event-cs1/index.js %} {% endhighlight %} {% highlight html tabtitle="index.html" %} -{% include code-snippet/grid/draganddrop-single-cs2/index.html %} +{% include code-snippet/grid/draganddrop-event-cs1/index.html %} {% endhighlight %} {% endtabs %} -{% previewsample "page.domainurl/code-snippet/grid/draganddrop-single-cs2" %} +{% previewsample "page.domainurl/code-snippet/grid/draganddrop-event-cs1" %} {% endif %} ## Limitations -* Multiple rows can be drag and drop in the row selections basis. * Single row is able to drag and drop in same grid without enable the row selection. -* Row drag and drop feature is not having built in support with sorting, filtering, hierarchy grid and grouping features of grid. However we can achieve sorting and filtering behavior by sample side customization which will be explained in the previous topic. \ No newline at end of file +* Row drag and drop feature is not having built in support with row template, detail template, hierarchy grid and grouping features of grid. + +## See also + +[Sorting data in the Syncfusion Grid](../sorting.md) +[Filtering data in the Syncfusion Grid](../filtering/filtering.md) diff --git a/ej2-javascript/grid/row/row-spanning.md b/ej2-javascript/grid/row/row-spanning.md index ae6c49552..eab7db24f 100644 --- a/ej2-javascript/grid/row/row-spanning.md +++ b/ej2-javascript/grid/row/row-spanning.md @@ -11,11 +11,13 @@ domainurl: ##DomainURL## # Row spanning in ##Platform_Name## Grid control -The grid has option to span row cells. To achieve this, You need to define the [`rowSpan`](../../api/grid/queryCellInfoEventArgs/#rowspan) attribute to span cells in the [`QueryCellInfo`](../../api/grid/queryCellInfoEventArgs) event. +The grid provides an option to span row cells, allowing you to merge two or more cells in a row into a single cell. This feature can be useful in scenarios where you want to display information that spans across multiple rows, but want to avoid repeating the same information in each row. -In the following demo, **Davolio** cell is spanned to two rows in the **EmployeeName** column. +To achieve this, You need to define the [rowSpan](../../api/grid/queryCellInfoEventArgs/#rowspan) attribute to span cells in the [queryCellInfo](../../api/grid/queryCellInfoEventArgs) event. The rowSpan attribute is used to specify the number of rows that the current cell should span. -Also Grid supports the spanning of rows and columns for same cells. **Lunch Break** cell is spanned to two rows and three columns in the **1:00** column. +The `queryCellInfo` event is triggered for each cell in the grid, and allows you to customize the cells in the grid. By handling this event, you can set the `rowSpan` attribute for a cell to achieve row spanning. + +In the following demo, **Davolio** cell is spanned to two rows in the **EmployeeName** column.Also Grid supports the spanning of rows and columns for same cells. **Lunch Break** cell is spanned to two rows and three columns in the **1:00** column. {% if page.publishingplatform == "typescript" %} @@ -44,4 +46,5 @@ Also Grid supports the spanning of rows and columns for same cells. **Lunch Brea {% previewsample "page.domainurl/code-snippet/grid/row-spanning-cs1" %} {% endif %} -> When paging is enabled in grid, you can disable the rows and columns spanning for any particular page. To achieve this, we need to check **requestType** as paging ` string` in [`queryCellInfo`](../../api/grid/queryCellInfoEventArgs) event of grid. \ No newline at end of file +> To disable the spanning for particular grid page, you need to use **requestType** from `queryCellInfo` event argument. +> The `rowSpan` and `colSpan` attributes can be used together to merge cells both vertically and horizontally. diff --git a/ej2-javascript/grid/row/row-template.md b/ej2-javascript/grid/row/row-template.md index cc78a9911..f6b8db340 100644 --- a/ej2-javascript/grid/row/row-template.md +++ b/ej2-javascript/grid/row/row-template.md @@ -11,7 +11,11 @@ domainurl: ##DomainURL## # Row template in ##Platform_Name## Grid control -The [`rowTemplate`](../../api/grid/#rowtemplate) has an option to customise the look and behavior of the grid rows. The [`rowTemplate`](../../api/grid/#rowtemplate) property accepts either the [template string](../../common/template-engine) or HTML element ID. +The row template feature in Grid allows you to customize the appearance and layout of rows in the grid. This feature is useful when you want to display custom content, such as images, buttons, or other controls, within the rows. + +To enable the row template feature, you need to set the [rowTemplate](../../api/grid/#rowtemplate) property of the Grid control. This property accepts a custom HTML template that defines the layout for each row. + +In the following example, Employee Information with Employee Photo is presented in the first column and employee details like Name, Address, etc., are presented in the second column. {% if page.publishingplatform == "typescript" %} @@ -40,11 +44,15 @@ The [`rowTemplate`](../../api/grid/#rowtemplate) has an option to customise the {% previewsample "page.domainurl/code-snippet/grid/row-template-cs30" %} {% endif %} ->The [`rowTemplate`](../../api/grid/#rowtemplate) property accepts only the TR element. - ## Row template with formatting -If the [`rowTemplate`](../../api/grid/#rowtemplate) is used, the value cannot be formatted inside the template using the [`columns.format`](../../api/grid/column/#format) property. In that case, a function should be defined globally to format the value and invoke it inside the template. +The row template feature in Syncfusion Grid allows you to customize the layout of rows in the grid. This is useful when you want to display images, buttons, or other custom content within the rows of a grid. + +By default, Syncfusion Grid provides the [columns->format](../../api/grid/column/#format) property to format the values displayed in each column. However, when using the [rowtemplate](../../api/grid/#rowtemplate), the `columns->format` property cannot be directly applied to format the values inside the template. + +To format the values within the row template, you can define a global function that handles the formatting logic. This function can be invoked inside the template to format the corresponding values. + +Here is an example of how to define a global formatting function for a date column and use it inside a `rowTemplate`: {% if page.publishingplatform == "typescript" %} @@ -73,9 +81,46 @@ If the [`rowTemplate`](../../api/grid/#rowtemplate) is used, the value cannot be {% previewsample "page.domainurl/code-snippet/grid/row-template-format-cs1" %} {% endif %} +>When using the `rowTemplate` feature in Syncfusion Grid, keep in mind that any formatting applied to columns using the `columns->format` property will not work inside the template. + +## Render syncfusion control in row template + +The Grid allows you to render custom Syncfusion controls within the rows of the grid. This feature is helpful as it enables you to display interactive Syncfusion controls instead of field values in the grid. + +To enable a Syncfusion control in a row template, you need to set the [rowTemplate](../../api/grid/#rowtemplate) property of the Grid control. This property accepts a custom HTML template that defines the layout for each row. + +Here is an example that demonstrates rendering Syncfusion controls within a row template : + +{% if page.publishingplatform == "typescript" %} + + {% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/grid/row-template-control-cs1/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/grid/row-template-control-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/grid/row-template-control-cs1" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/grid/row-template-control-cs1/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/grid/row-template-control-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/grid/row-template-control-cs1" %} +{% endif %} + ## Limitations -Row template feature is not compatible with all the features which are available in grid and it has limited features support. Here we have listed out the features which are not compatible with row template feature. +Row template feature is not compatible with all the features which are available in the grid, and it has limited features support. The features that are incompatible with the row template feature are listed below. * Filtering * Paging @@ -98,4 +143,4 @@ Row template feature is not compatible with all the features which are available * Reordering * Aggregates * Clipboard -* Adaptive view \ No newline at end of file +* Adaptive view diff --git a/ej2-javascript/pivotview/js/server-side-pivot-engine.md b/ej2-javascript/pivotview/js/server-side-pivot-engine.md index 86150215f..e5c807ff4 100644 --- a/ej2-javascript/pivotview/js/server-side-pivot-engine.md +++ b/ej2-javascript/pivotview/js/server-side-pivot-engine.md @@ -522,10 +522,10 @@ public class PivotExpandoData ``` -To bind the data source, set its class **PivotExpandoData** to **TValue** of the **PivotEngine** class. +To bind the data source, set its model type as **ExpandoObject** to **TValue** of the **PivotEngine** class. ```c# -private PivotEngine PivotEngine = new PivotEngine(); +private PivotEngine PivotEngine = new PivotEngine(); ``` diff --git a/ej2-javascript/pivotview/ts/server-side-pivot-engine.md b/ej2-javascript/pivotview/ts/server-side-pivot-engine.md index 0b15b1add..8a7f38c7d 100644 --- a/ej2-javascript/pivotview/ts/server-side-pivot-engine.md +++ b/ej2-javascript/pivotview/ts/server-side-pivot-engine.md @@ -526,10 +526,10 @@ public class PivotExpandoData ``` -To bind the data source, set its class **PivotExpandoData** to **TValue** of the **PivotEngine** class. +To bind the data source, set its model type as **ExpandoObject** to **TValue** of the **PivotEngine** class. ```c# -private PivotEngine PivotEngine = new PivotEngine(); +private PivotEngine PivotEngine = new PivotEngine(); ``` diff --git a/ej2-javascript/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md b/ej2-javascript/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md new file mode 100644 index 000000000..9fe39c1b3 --- /dev/null +++ b/ej2-javascript/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md @@ -0,0 +1,43 @@ +--- +layout: post +title: Insert a sheet programmatically and make the inserted sheet as the active sheet in ##Platform_Name## Spreadsheet control | Syncfusion +description: Learn here all about insert a sheet programmatically and make the inserted sheet as the active sheet in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. +platform: ej2-javascript +control: Spreadsheet +publishingplatform: ##Platform_Name## +documentation: ug +domainurl: ##DomainURL## +--- + +## Insert a sheet programmatically and make it the active sheet in ##Platform_Name## Spreadsheet control + +A sheet is a collection of cells organized in the form of rows and columns that allows you to store, format, and manipulate the data. Using [insertSheet](https://helpej2.syncfusion.com/documentation/api/spreadsheet/#insertsheet) method, you can insert one or more sheets at the desired index. Then, you can make the inserted sheet as active sheet by focusing the start cell of that sheet using the [goTo](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/#goto) method. + +The following code example shows how to insert a sheet programmatically and make it the active sheet. + +{% if page.publishingplatform == "typescript" %} + +{% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/spreadsheet/insert-sheet-change-active-sheet-cs1" %} +{% endif %} diff --git a/ej2-javascript/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md b/ej2-javascript/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md new file mode 100644 index 000000000..1719307aa --- /dev/null +++ b/ej2-javascript/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md @@ -0,0 +1,45 @@ +--- +layout: post +title: Save and open Spreadsheet data as a Base64 string in ##Platform_Name## Spreadsheet control | Syncfusion +description: Learn here all about save and open Spreadsheet data as a Base64 string in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. +platform: ej2-javascript +control: Spreadsheet +publishingplatform: ##Platform_Name## +documentation: ug +domainurl: ##DomainURL## +--- + +## Save and open Spreadsheet data as a Base64 string in ##Platform_Name## Spreadsheet control + +In the Spreadsheet control, there is currently no direct option to save and open data as a `Base64` string. You can achieve this by saving the Spreadsheet data as blob data and then converting that saved blob data to a `Base64` string using `FileReader`. + +> You can get the Spreadsheet data as blob in the [saveComplete](https://helpej2.syncfusion.com/documentation/api/spreadsheet/#savecomplete) event when you set the `needBlobData` as **true** and `isFullPost` as **false** in the [beforeSave](https://helpej2.syncfusion.com/documentation/api/spreadsheet/#beforesave) event. + +The following code example shows how to save and open the spreadsheet data as base64 string. + +{% if page.publishingplatform == "typescript" %} + +{% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/spreadsheet/base-64-string/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/spreadsheet/base-64-string/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/spreadsheet/base-64-string" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/spreadsheet/base-64-string/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/spreadsheet/base-64-string/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/spreadsheet/base-64-string" %} +{% endif %} diff --git a/ej2-typescript-toc.html b/ej2-typescript-toc.html index 946e2b6a4..a0430f949 100644 --- a/ej2-typescript-toc.html +++ b/ej2-typescript-toc.html @@ -2210,6 +2210,8 @@
  • Changing the active sheet while importing a file
  • Import an excel document using file uploader
  • Identify the context menu opened
  • +
  • Save and open Spreadsheet data as Base64 string
  • +
  • Insert a sheet programmatically and make it the active sheet
  • Mobile Responsiveness
  • ${OrderID}${CustomerID}${EmployeeID}
    ' + -'' + -'${for(detail of Order_Details)}${/for}' + -'
    IDPriceQuantity
    ${detail.ProductID}${detail.UnitPrice}${detail.Quantity}
    '; + var compiledFunction = ej.base.compile(template); -var groupFn = ej.base.compile(group); -const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/'; +const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; var table = (document.getElementById('datatable')); new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor }) - .executeQuery(new ej.data.Query().from('Orders').take(3).hierarchy( - new ej.data.Query() - .foreignKey("OrderID") - .from("Order_Details") - .sortBy("Quantity"), - function () { - // Selective loading of child elements - return [10248, 10249, 10250] - } - )) + .executeQuery(new ej.data.Query().take(8)) .then((e) => { (e.result).forEach((data) => { table.appendChild(compiledFunction(data)[0]); - table.appendChild(groupFn(data)[0]); }); }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs2/index.ts index 4ef97cc80..56bbabd5d 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs2/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }).executeQuery(new Query().take(8)).then((e: ReturnOption) => { +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }).executeQuery(new Query().take(8)).then((e: ReturnOption) => { (e.result).forEach((data: Object) => { table.appendChild(compiledFunction(data)[0]); diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs2/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs2/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs2/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs2/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs2/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs2/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs2/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs2/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs20/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs20/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs20/index.ts index 4c56daad3..d68b78abf 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs20/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().where('EmployeeID', 'equal', 3).take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs20/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs20/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs20/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs20/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs20/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs20/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs20/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs20/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs21/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs21/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs21/index.ts index e778939c1..438c4854c 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs21/index.ts @@ -1,13 +1,13 @@ -import { DataManager, Query, ODataAdaptor, Predicate, ReturnOption } from '@syncfusion/ej2-data'; +import { DataManager, Query, ODataV4Adaptor, Predicate, ReturnOption } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); @@ -15,7 +15,7 @@ let table: HTMLElement = (document.getElementById('datatable')); let predicate: Predicate = new Predicate('EmployeeID', 'equal', 3); predicate = predicate.or('EmployeeID', 'equal', 2); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().where(predicate).take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs21/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs21/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs21/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs21/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs21/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs21/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs21/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs21/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs23/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs23/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs23/index.ts index 3e2dcb8fe..cb07e0b83 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs23/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = '${for(item of items)}${/for}'; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().group('CustomerID').take(8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs23/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs23/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs23/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs23/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs23/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs23/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs23/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs23/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${field} - ${key}
    ${item.OrderID}${item.CustomerID}${item.EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs24/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs24/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs24/index.ts index bac33f2ba..45133403d 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs24/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().page(2, 8)) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs24/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs24/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs24/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs24/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs24/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs24/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs24/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs24/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs25/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs25/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs25/index.ts index 76d47d64d..916e8fb7f 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs25/index.ts @@ -1,6 +1,6 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; @@ -8,11 +8,11 @@ let template: string = ''); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().take(5).requiresCount().aggregate('min', 'EmployeeID')) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs25/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs25/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs25/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs25/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs25/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs25/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs25/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs25/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    ${OrderID}${CustomerID}${Emplo let compiledFunction: Function = compile(template); let footerFn: Function = compile('
    Minimum: ${min}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs28/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs28/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/index.js b/ej2-javascript/code-snippet/data/getting-started-cs28/index.js index db28ae6d6..db3ba4e29 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs28/index.js @@ -2,11 +2,11 @@ var template = '' let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://services.syncfusion.com/js/production/api/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI }).executeQuery(new Query()).then((e: ReturnOption) => { +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor(), }).executeQuery(new Query().take(8)).then((e: ReturnOption) => { (e.result).forEach((data: Object) => { table.appendChild(compiledFunction(data)[0]); diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs28/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs28/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs28/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs28/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs3/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs3/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/index.js b/ej2-javascript/code-snippet/data/getting-started-cs3/index.js index 56bc123e7..51222cd3b 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs3/index.js @@ -1,30 +1,22 @@ -var template = '' -var group = ' @@ -68,12 +56,11 @@
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/systemjs.config.js b/ej2-javascript/code-snippet/grid/row-template-cs30/systemjs.config.js index 05bf940b7..e32347149 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/ts/index.html b/ej2-javascript/code-snippet/grid/row-template-cs30/ts/index.html index 4b0547511..cd6258c4d 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/ts/index.html +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + @@ -54,12 +48,6 @@ - - - -
    ${OrderID}${CustomerID}${EmployeeID} { +new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor(), }).executeQuery(new ej.data.Query().take(8)).then((e) => { (e.result).forEach((data) => { table.appendChild(compiledFunction(data)[0]); diff --git a/ej2-javascript/code-snippet/data/getting-started-cs28/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs28/index.ts index 9fd0b5a71..d6387e650 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs28/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs28/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = '
    ${OrderID}${CustomerID}${EmployeeID}
    ${OrderID}${CustomerID}${EmployeeID}
    ' + -'' + -'${for(detail of Order_Details)}${/for}' + -'
    IDPriceQuantity
    ${detail.ProductID}${detail.UnitPrice}${detail.Quantity}
    '; -var compiledFunction = ej.base.compile(template); -var groupFn = ej.base.compile(group); - -const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; - -var table = (document.getElementById('datatable')); - -new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor }) - .executeQuery(new ej.data.Query().from('Orders').take(3).hierarchy( - new ej.data.Query() - .foreignKey("OrderID") - .from("Order_Details") - .sortBy("Quantity"), - function () { - // Selective loading of child elements - return [10248, 10249, 10250] - } - )) - .then((e) => { - (e.result).forEach((data) => { + +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; +import { compile } from '@syncfusion/ej2-base'; + +let template: string = ''; + +let compiledFunction: Function = compile(template); + +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; + +let table: HTMLElement = (document.getElementById('datatable')); + +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }).executeQuery(new Query().take(8)).then((e: ReturnOption) => { + + (e.result).forEach((data: Object) => { table.appendChild(compiledFunction(data)[0]); - table.appendChild(groupFn(data)[0]); }); - }); \ No newline at end of file +}); + + + diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs3/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs3/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs3/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs3/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs3/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs3/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs3/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs3/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs32/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs32/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs32/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs32/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs33/index.js b/ej2-javascript/code-snippet/data/getting-started-cs33/index.js index edf77faab..72d46e7cd 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs33/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs33/index.js @@ -1,7 +1,7 @@ -const SERVICE_URI = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders/?$top=20'; +const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; var grid = new ej.grids.Grid({ - dataSource: new ej.data.DataManager({ url: SERVICE_URI }), + dataSource: new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor(), }), columns: [ { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 90, type: 'number' }, { field: 'CustomerID', width: 120, headerText: 'Customer ID', type: 'string' }, diff --git a/ej2-javascript/code-snippet/data/getting-started-cs33/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs33/index.ts index f4f79d9c6..5acd4382c 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs33/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs33/index.ts @@ -1,12 +1,12 @@ import { Grid } from '@syncfusion/ej2-grids'; -import { DataManager } from '@syncfusion/ej2-data'; +import { DataManager, ODataV4Adaptor } from '@syncfusion/ej2-data'; -const SERVICE_URI: string = 'https://services.syncfusion.com/js/production/api/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let grid: Grid = new Grid({ - dataSource: new DataManager({ url: SERVICE_URI }), + dataSource: new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor(), }), columns: [ { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 90, type: 'number' }, { field: 'CustomerID', width: 120, headerText: 'Customer ID', type: 'string' }, diff --git a/ej2-javascript/code-snippet/data/getting-started-cs33/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs33/js/index.html index 9b126a655..5a55fe0ca 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs33/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs33/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs33/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs33/systemjs.config.js index 124519fb8..b93c833bf 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs33/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs33/systemjs.config.js @@ -36,6 +36,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs4/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs4/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/index.js b/ej2-javascript/code-snippet/data/getting-started-cs4/index.js index 50235aaf6..dabfb6998 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/index.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs4/index.js @@ -1,30 +1,26 @@ - -var template = '' -var group = ' - - - -
    ${OrderID}${CustomerID}${EmployeeID}
    ' + -'' + -'${for(detail of Order_Details)}${/for}' + -'
    IDPriceQuantity
    ${detail.ProductID}${detail.UnitPrice}${detail.Quantity}
    '; +var template = ''; + var compiledFunction = ej.base.compile(template); -var groupFn = ej.base.compile(group); - -const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/'; - -var table = (document.getElementById('datatable')); - -new ej.data.DataManager({ url: SERVICE_URI, adaptor: new ej.data.ODataV4Adaptor }) - .executeQuery(new ej.data.Query().from('Orders').take(3).hierarchy( - new ej.data.Query() - .foreignKey("OrderID") - .from("Order_Details") - .sortBy("Quantity"), - function () { - // Selective loading of child elements - return [10248, 10249, 10250] - } - )) + +class SerialNoAdaptor extends ej.data.ODataV4Adaptor { + processResponse() { + let i = 0; + // calling the base class processResponse function + let original = super.processResponse.apply(this, arguments); + // Adding serial number + original.forEach((item) => item['Sno'] = ++i); + return original; + } +} + +const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; + +var table = document.getElementById('datatable'); + +new ej.data.DataManager({ url: SERVICE_URI, adaptor: new SerialNoAdaptor() }) + .executeQuery(new ej.data.Query().take(8)) .then((e) => { (e.result).forEach((data) => { table.appendChild(compiledFunction(data)[0]); - table.appendChild(groupFn(data)[0]); }); }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs4/index.ts index 729aed69f..0f7e8ee0f 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs4/index.ts @@ -1,24 +1,23 @@ - - -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; -class SerialNoAdaptor extends ODataAdaptor { +class SerialNoAdaptor extends ODataV4Adaptor { + public processResponse(): Object { let i: number = 0; //calling base class processResponse function let original: Object[] = super.processResponse.apply(this, arguments); //Adding serial number - original.forEach((item: Object) => item['Sno'] = ++i); + original.forEach((item: Object) => item['SNO'] = ++i); return original; } } -let template: string = ''; +let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); @@ -29,8 +28,4 @@ new DataManager({ url: SERVICE_URI, adaptor: new SerialNoAdaptor }).executeQuery (e.result).forEach((data: Object) => { table.appendChild(compiledFunction(data)[0]); }); -}); - - - - +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs4/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs4/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs4/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs4/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs4/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs4/ts/index.html index 0b467b2b4..697d01d36 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs4/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs4/ts/index.html @@ -23,12 +23,11 @@ -
    Loading....
    ${Sno}${CustomerID}${EmployeeID}
    ${Sno}${CustomerID}${EmployeeID}
    ${SNO}${CustomerID}${EmployeeID}
    - + diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs7/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs7/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs7/index.ts index 6e92e0f65..2daf1059d 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs7/index.ts @@ -1,17 +1,17 @@ -import { DataManager, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders/?$top=7'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/?$top=7'; let table: HTMLElement = (document.getElementById('datatable')); -let dm: DataManager = new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor, offline: true }); +let dm: DataManager = new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor, offline: true }); dm.ready.then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs7/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs7/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs7/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs7/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs7/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs7/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs7/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs7/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    Order IDCustomer IDEmployee ID
    SNOCustomer IDEmployee ID
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/datasource.ts b/ej2-javascript/code-snippet/data/getting-started-cs8/datasource.ts deleted file mode 100644 index afaf65670..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/datasource.ts +++ /dev/null @@ -1,76 +0,0 @@ -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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/es5-datasource.js b/ej2-javascript/code-snippet/data/getting-started-cs8/es5-datasource.js deleted file mode 100644 index 955466c83..000000000 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/es5-datasource.js +++ /dev/null @@ -1,76 +0,0 @@ -var data = [ - { - 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 - }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/index.ts b/ej2-javascript/code-snippet/data/getting-started-cs8/index.ts index 27d248970..7ee715a77 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/index.ts +++ b/ej2-javascript/code-snippet/data/getting-started-cs8/index.ts @@ -1,17 +1,17 @@ -import { DataManager, Query, ReturnOption, ODataAdaptor } from '@syncfusion/ej2-data'; +import { DataManager, Query, ReturnOption, ODataV4Adaptor } from '@syncfusion/ej2-data'; import { compile } from '@syncfusion/ej2-base'; let template: string = ''; let compiledFunction: Function = compile(template); -const SERVICE_URI: string = 'https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders'; +const SERVICE_URI: string = 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/'; let table: HTMLElement = (document.getElementById('datatable')); -new DataManager({ url: SERVICE_URI, adaptor: new ODataAdaptor }) +new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor }) .executeQuery(new Query().addParams('$top', '7')) .then((e: ReturnOption) => { (e.result).forEach((data: Object) => { diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/js/index.html b/ej2-javascript/code-snippet/data/getting-started-cs8/js/index.html index 705476b3f..172073232 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/js/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs8/js/index.html @@ -19,7 +19,6 @@ - diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/systemjs.config.js b/ej2-javascript/code-snippet/data/getting-started-cs8/systemjs.config.js index 28dd2c965..69129aff2 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/systemjs.config.js +++ b/ej2-javascript/code-snippet/data/getting-started-cs8/systemjs.config.js @@ -35,6 +35,5 @@ System.config({ }); System.import('index.ts').catch(console.error.bind(console)).then(function () { - document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; }); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/data/getting-started-cs8/ts/index.html b/ej2-javascript/code-snippet/data/getting-started-cs8/ts/index.html index 0b467b2b4..e518c1112 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs8/ts/index.html +++ b/ej2-javascript/code-snippet/data/getting-started-cs8/ts/index.html @@ -23,7 +23,6 @@ -
    Loading....
    ${OrderID}${CustomerID}${EmployeeID}
    diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/Medium-36px-spin.gif b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/Medium-36px-spin.gif deleted file mode 100644 index fe8c4331b..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/Medium-36px-spin.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.css b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.css index 3e3720eea..0fba63172 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.css +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.css @@ -11,4 +11,4 @@ position: absolute; top: 45%; width: 30%; -} +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.js b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.js index 45aa75b49..928fcd35f 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.js @@ -1,6 +1,6 @@ ej.grids.Grid.Inject(ej.grids.DetailRow); var grid = new ej.grids.Grid({ - dataSource: employeeData.slice(2, 5), + dataSource: employeeData, detailTemplate: '#detailtemplate', columns: [ { field: 'FirstName', headerText: 'First Name', width: 140 }, @@ -10,7 +10,7 @@ var grid = new ej.grids.Grid({ ], detailDataBound: function(e){ var detail = new ej.grids.Grid({ - dataSource: data.filter(function(item){item['EmployeeID'] === e.data['EmployeeID']}).slice(0, 3), + dataSource: data.filter(function(item){ return item['EmployeeID'] === e.data['EmployeeID'];}), columns: [ { field: 'OrderID', headerText: 'Order ID', width: 110 }, { field: 'CustomerID', headerText: 'Customer Name', width: 140 }, @@ -20,5 +20,4 @@ var grid = new ej.grids.Grid({ detail.appendTo(e.detailElement.querySelector('.custom-grid')); } }); -grid.appendTo('#Grid'); - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.ts b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.ts index 251bcc1b0..b62180105 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/index.ts @@ -1,12 +1,10 @@ - - import { Grid, DetailRow, DetailDataBoundEventArgs } from '@syncfusion/ej2-grids'; import { employeeData, data } from './datasource.ts'; Grid.Inject(DetailRow); let grid: Grid = new Grid({ - dataSource: employeeData.slice(2, 5), + dataSource: employeeData, detailTemplate: '#detailtemplate', columns: [ { field: 'FirstName', headerText: 'First Name', width: 140 }, @@ -16,7 +14,7 @@ let grid: Grid = new Grid({ ], detailDataBound: (e: DetailDataBoundEventArgs) => { let detail = new Grid({ - dataSource: data.filter((item: Object) => item['EmployeeID'] === e.data['EmployeeID']).slice(0, 3), + dataSource: data.filter((item: Object) => item['EmployeeID'] === e.data['EmployeeID']), columns: [ { field: 'OrderID', headerText: 'Order ID', width: 110 }, { field: 'CustomerID', headerText: 'Customer Name', width: 140 }, @@ -26,7 +24,4 @@ let grid: Grid = new Grid({ detail.appendTo(e.detailElement.querySelector('.custom-grid')); } }); -grid.appendTo('#Grid'); - - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/js/index.html b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/js/index.html index f1bbae9fa..8c61e72f0 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/js/index.html @@ -1,44 +1,36 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + -
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/systemjs.config.js index cb5c17847..352328f53 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/ts/index.html index a01c0fc28..e58d3d447 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/waitingpopup.gif b/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/waitingpopup.gif deleted file mode 100644 index a2eae442e..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-childgrid-cs1/waitingpopup.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/Medium-36px-spin.gif b/ej2-javascript/code-snippet/grid/detail-template-cs1/Medium-36px-spin.gif deleted file mode 100644 index fe8c4331b..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-cs1/Medium-36px-spin.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/detail-template-cs1/datasource.ts index c7b6b3d0c..34b16355a 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/datasource.ts @@ -1,80 +1,3 @@ -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 - }]; - export let employeeData: Object[] = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/detail-template-cs1/es5-datasource.js index 7fc7297c3..48931ebb2 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/es5-datasource.js @@ -1,80 +1,3 @@ -var data = [ - { - 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 - }]; - var employeeData = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/index.js b/ej2-javascript/code-snippet/grid/detail-template-cs1/index.js index 95ff717f6..f93503b4f 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/index.js @@ -10,5 +10,4 @@ var grid = new ej.grids.Grid({ ], height: 315 }); -grid.appendTo('#Grid'); - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/index.ts b/ej2-javascript/code-snippet/grid/detail-template-cs1/index.ts index 4fa2f7958..d2feaa8f1 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/index.ts @@ -1,5 +1,3 @@ - - import { Grid, DetailRow } from '@syncfusion/ej2-grids'; import { employeeData } from './datasource.ts'; @@ -16,7 +14,4 @@ let grid: Grid = new Grid({ ], height: 315 }); -grid.appendTo('#Grid'); - - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/js/index.html b/ej2-javascript/code-snippet/grid/detail-template-cs1/js/index.html index 683414ae9..a2dcc88c4 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/js/index.html @@ -1,29 +1,24 @@ - + + + EJ2 Grid - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - +
    -
    +
    - - - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/detail-template-cs1/systemjs.config.js index 1f42105b0..5424bb49e 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/detail-template-cs1/ts/index.html index ba967c895..a2c7f002b 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/detail-template-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/detail-template-cs1/waitingpopup.gif b/ej2-javascript/code-snippet/grid/detail-template-cs1/waitingpopup.gif deleted file mode 100644 index a2eae442e..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-cs1/waitingpopup.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/1.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/1.png new file mode 100644 index 000000000..677201146 Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/1.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/2.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/2.png new file mode 100644 index 000000000..c038c884a Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/2.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/3.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/3.png new file mode 100644 index 000000000..02403629b Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/3.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/4.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/4.png new file mode 100644 index 000000000..c2166f16a Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/4.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/5.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/5.png new file mode 100644 index 000000000..5477dece4 Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/5.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/6.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/6.png new file mode 100644 index 000000000..c86c4e53d Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/6.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/7.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/7.png new file mode 100644 index 000000000..dba7673f8 Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/7.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/8.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/8.png new file mode 100644 index 000000000..861f5907a Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/8.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/9.png b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/9.png new file mode 100644 index 000000000..6892ac20b Binary files /dev/null and b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/9.png differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/datasource.ts new file mode 100644 index 000000000..34b16355a --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/datasource.ts @@ -0,0 +1,205 @@ +export let employeeData: Object[] = [{ + 'EmployeeID': 1, + 'LastName': 'Davolio', + 'FirstName': 'Nancy', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-664743600000), + 'HireDate': new Date(704692800000), + 'Address': '507 - 20th Ave. E.\r\nApt. 2A', + 'City': 'Seattle', + 'Region': 'WA', + 'PostalCode': '98122', + 'Country': 'USA', + 'HomePhone': '(206) 555-9857', + 'Extension': '5467', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ + \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 2, + 'LastName': 'Fuller', + 'FirstName': 'Andrew', + 'Title': 'Vice President, Sales', + 'TitleOfCourtesy': 'Dr.', + 'BirthDate': new Date(-563828400000), + 'HireDate': new Date(713764800000), + 'Address': '908 W. Capital Way', + 'City': 'Tacoma', + 'Region': 'WA', + 'PostalCode': '98401', + 'Country': 'USA', + 'HomePhone': '(206) 555-9482', + 'Extension': '3457', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ + Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ + was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ + Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', + 'ReportsTo': 0, + 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' +}, +{ + 'EmployeeID': 3, + 'LastName': 'Leverling', + 'FirstName': 'Janet', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-200088000000), + 'HireDate': new Date(702104400000), + 'Address': '722 Moss Bay Blvd.', + 'City': 'Kirkland', + 'Region': 'WA', + 'PostalCode': '98033', + 'Country': 'USA', + 'HomePhone': '(206) 555-3412', + 'Extension': '3355', + 'Photo': { 'Length': 21722 }, + + 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ + She has also completed a certificate program in food retailing management.\ + Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' +}, +{ + 'EmployeeID': 4, + 'LastName': 'Peacock', + 'FirstName': 'Margaret', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mrs.', + 'BirthDate': new Date(-1018814400000), + 'HireDate': new Date(736401600000), + 'Address': '4110 Old Redmond Rd.', + 'City': 'Redmond', + 'Region': 'WA', + 'PostalCode': '98052', + 'Country': 'USA', + 'HomePhone': '(206) 555-8122', + 'Extension': '5176', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ + Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' +}, +{ + 'EmployeeID': 5, + 'LastName': 'Buchanan', + 'FirstName': 'Steven', + 'Title': 'Sales Manager', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-468010800000), + 'HireDate': new Date(750830400000), + 'Address': '14 Garrett Hill', + 'City': 'London', + 'Region': null, + 'PostalCode': + 'SW1 8JR', + 'Country': 'UK', + 'HomePhone': '(71) 555-4848', + 'Extension': '3453', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ + a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ + post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ + Telemarketing\' and \'International Sales Management.\' He is fluent in French.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' +}, +{ + 'EmployeeID': 6, + 'LastName': 'Suyama', + 'FirstName': 'Michael', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-205185600000), + 'HireDate': new Date(750830400000), + 'Address': 'Coventry House\r\nMiner Rd.', + 'City': 'London', + 'Region': null, + 'PostalCode': 'EC2 7JR', + 'Country': 'UK', + 'HomePhone': '(71) 555-7773', + 'Extension': '428', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ + (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ + He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 7, + 'LastName': 'King', + 'FirstName': 'Robert', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-302731200000), + 'HireDate': new Date(757486800000), + 'Address': 'Edgeham Hollow\r\nWinchester Way', + 'City': 'London', + 'Region': null, + 'PostalCode': 'RG1 9SP', + 'Country': 'UK', + 'HomePhone': '(71) 555-5598', + 'Extension': '465', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ + University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ + he was transferred to the London office in March 1993.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 8, + 'LastName': 'Callahan', + 'FirstName': 'Laura', + 'Title': 'Inside Sales Coordinator', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-377982000000), + 'HireDate': new Date(762843600000), + 'Address': '4726 - 11th Ave. N.E.', + 'City': 'Seattle', + 'Region': 'WA', + 'PostalCode': '98105', + 'Country': 'USA', + 'HomePhone': '(206) 555-1189', + 'Extension': '2344', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ + French. She reads and writes French.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 9, + 'LastName': 'Dodsworth', + 'FirstName': 'Anne', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-123966000000), + 'HireDate': new Date(784875600000), + 'Address': '7 Houndstooth Rd.', + 'City': 'London', + 'Region': null, + 'PostalCode': 'WG2 7LT', + 'Country': 'UK', + 'HomePhone': '(71) 555-4444', + 'Extension': '452', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/es5-datasource.js new file mode 100644 index 000000000..48931ebb2 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/es5-datasource.js @@ -0,0 +1,205 @@ +var employeeData = [{ + 'EmployeeID': 1, + 'LastName': 'Davolio', + 'FirstName': 'Nancy', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-664743600000), + 'HireDate': new Date(704692800000), + 'Address': '507 - 20th Ave. E.\r\nApt. 2A', + 'City': 'Seattle', + 'Region': 'WA', + 'PostalCode': '98122', + 'Country': 'USA', + 'HomePhone': '(206) 555-9857', + 'Extension': '5467', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ + \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 2, + 'LastName': 'Fuller', + 'FirstName': 'Andrew', + 'Title': 'Vice President, Sales', + 'TitleOfCourtesy': 'Dr.', + 'BirthDate': new Date(-563828400000), + 'HireDate': new Date(713764800000), + 'Address': '908 W. Capital Way', + 'City': 'Tacoma', + 'Region': 'WA', + 'PostalCode': '98401', + 'Country': 'USA', + 'HomePhone': '(206) 555-9482', + 'Extension': '3457', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ + Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ + was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ + Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', + 'ReportsTo': 0, + 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' +}, +{ + 'EmployeeID': 3, + 'LastName': 'Leverling', + 'FirstName': 'Janet', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-200088000000), + 'HireDate': new Date(702104400000), + 'Address': '722 Moss Bay Blvd.', + 'City': 'Kirkland', + 'Region': 'WA', + 'PostalCode': '98033', + 'Country': 'USA', + 'HomePhone': '(206) 555-3412', + 'Extension': '3355', + 'Photo': { 'Length': 21722 }, + + 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ + She has also completed a certificate program in food retailing management.\ + Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' +}, +{ + 'EmployeeID': 4, + 'LastName': 'Peacock', + 'FirstName': 'Margaret', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mrs.', + 'BirthDate': new Date(-1018814400000), + 'HireDate': new Date(736401600000), + 'Address': '4110 Old Redmond Rd.', + 'City': 'Redmond', + 'Region': 'WA', + 'PostalCode': '98052', + 'Country': 'USA', + 'HomePhone': '(206) 555-8122', + 'Extension': '5176', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ + Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' +}, +{ + 'EmployeeID': 5, + 'LastName': 'Buchanan', + 'FirstName': 'Steven', + 'Title': 'Sales Manager', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-468010800000), + 'HireDate': new Date(750830400000), + 'Address': '14 Garrett Hill', + 'City': 'London', + 'Region': null, + 'PostalCode': + 'SW1 8JR', + 'Country': 'UK', + 'HomePhone': '(71) 555-4848', + 'Extension': '3453', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ + a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ + post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ + Telemarketing\' and \'International Sales Management.\' He is fluent in French.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' +}, +{ + 'EmployeeID': 6, + 'LastName': 'Suyama', + 'FirstName': 'Michael', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-205185600000), + 'HireDate': new Date(750830400000), + 'Address': 'Coventry House\r\nMiner Rd.', + 'City': 'London', + 'Region': null, + 'PostalCode': 'EC2 7JR', + 'Country': 'UK', + 'HomePhone': '(71) 555-7773', + 'Extension': '428', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ + (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ + He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 7, + 'LastName': 'King', + 'FirstName': 'Robert', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Mr.', + 'BirthDate': new Date(-302731200000), + 'HireDate': new Date(757486800000), + 'Address': 'Edgeham Hollow\r\nWinchester Way', + 'City': 'London', + 'Region': null, + 'PostalCode': 'RG1 9SP', + 'Country': 'UK', + 'HomePhone': '(71) 555-5598', + 'Extension': '465', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ + University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ + he was transferred to the London office in March 1993.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 8, + 'LastName': 'Callahan', + 'FirstName': 'Laura', + 'Title': 'Inside Sales Coordinator', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-377982000000), + 'HireDate': new Date(762843600000), + 'Address': '4726 - 11th Ave. N.E.', + 'City': 'Seattle', + 'Region': 'WA', + 'PostalCode': '98105', + 'Country': 'USA', + 'HomePhone': '(206) 555-1189', + 'Extension': '2344', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ + French. She reads and writes French.', + 'ReportsTo': 2, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}, +{ + 'EmployeeID': 9, + 'LastName': 'Dodsworth', + 'FirstName': 'Anne', + 'Title': 'Sales Representative', + 'TitleOfCourtesy': 'Ms.', + 'BirthDate': new Date(-123966000000), + 'HireDate': new Date(784875600000), + 'Address': '7 Houndstooth Rd.', + 'City': 'London', + 'Region': null, + 'PostalCode': 'WG2 7LT', + 'Country': 'UK', + 'HomePhone': '(71) 555-4444', + 'Extension': '452', + 'Photo': { 'Length': 21626 }, + + 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', + 'ReportsTo': 5, + 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' +}]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.css b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.css new file mode 100644 index 000000000..038bf196b --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.css @@ -0,0 +1,34 @@ +#container { + visibility: hidden; +} + +#loader { + color: #008cff; + font-family: 'Helvetica Neue','calibiri'; + font-size: 14px; + height: 40px; + left: 45%; + position: absolute; + top: 45%; + width: 30%; +} + +.detailtable td{ + font-size: 13px; + padding: 4px; + white-space: nowrap; +} + +.photo { + border-radius: 50px; + box-shadow: inset 0 0 1px #e0e0e0, inset 0 0 14px rgba(0,0,0,0.2); + height: 100px; + width: 100px; +} + +@media screen and (max-width: 800px) and (min-width: 320px) { + .photo { + height: 70px; + width: 70px; + } +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.js b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.js new file mode 100644 index 000000000..f93503b4f --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.js @@ -0,0 +1,13 @@ +ej.grids.Grid.Inject(ej.grids.DetailRow); +var grid = new ej.grids.Grid({ + dataSource: employeeData, + detailTemplate: '#detailtemplate', + columns: [ + { field: 'FirstName', headerText: 'First Name', width: 140 }, + { field: 'LastName', headerText: 'Last Name', width: 140 }, + { field: 'Title', headerText: 'Title', width: 150 }, + { field: 'Country', headerText: 'Country', width: 150 } + ], + height: 315 +}); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.ts b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.ts new file mode 100644 index 000000000..d2feaa8f1 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/index.ts @@ -0,0 +1,17 @@ +import { Grid, DetailRow } from '@syncfusion/ej2-grids'; +import { employeeData } from './datasource.ts'; + +Grid.Inject(DetailRow); + +let grid: Grid = new Grid({ + dataSource: employeeData, + detailTemplate: '#detailtemplate', + columns: [ + { field: 'FirstName', headerText: 'First Name', width: 140 }, + { field: 'LastName', headerText: 'Last Name', width: 140 }, + { field: 'Title', headerText: 'Title', width: 150 }, + { field: 'Country', headerText: 'Country', width: 150 } + ], + height: 315 +}); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/js/index.html b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/js/index.html new file mode 100644 index 000000000..3b1482721 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/js/index.html @@ -0,0 +1,88 @@ + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/systemjs.config.js new file mode 100644 index 000000000..164aa2118 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/systemjs.config.js @@ -0,0 +1,39 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js", + "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js", + "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js", + "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js", + "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js" + } +}); +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/ts/index.html new file mode 100644 index 000000000..7c467b9ec --- /dev/null +++ b/ej2-javascript/code-snippet/grid/detail-template-icon-cs1/ts/index.html @@ -0,0 +1,84 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + +
    Loading....
    +
    +
    +
    + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/Medium-36px-spin.gif b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/Medium-36px-spin.gif deleted file mode 100644 index fe8c4331b..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/Medium-36px-spin.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/datasource.ts index c7b6b3d0c..34b16355a 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/datasource.ts @@ -1,80 +1,3 @@ -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 - }]; - export let employeeData: Object[] = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/es5-datasource.js index 7fc7297c3..48931ebb2 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/es5-datasource.js @@ -1,80 +1,3 @@ -var data = [ - { - 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 - }]; - var employeeData = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.js b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.js index 0b57af8f0..b1e903161 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.js @@ -1,5 +1,3 @@ -var expandBtn = new ej.buttons.Button(); -expandBtn.appendTo('#expand'); ej.grids.Grid.Inject(ej.grids.DetailRow); var grid = new ej.grids.Grid({ dataSource: employeeData, @@ -14,9 +12,16 @@ var grid = new ej.grids.Grid({ }); grid.appendTo('#Grid'); -document.getElementById('expand').addEventListener('click', function(){ - var inputElem = document.getElementsByClassName('rowindex')[0]; - var rowIndex = parseInt(inputElem.value, 10); - grid.detailRowModule.expand(rowIndex); +var expandButton = new ej.buttons.Button(); +expandButton.appendTo('#expand'); + +var textbox = new ej.inputs.TextBox({ + placeholder: 'Enter the Row Index', + floatLabelType: 'Auto', + width: 250 }); +textbox.appendTo('#rowindex'); +document.getElementById('expand').addEventListener('click', function(args){ + grid.detailRowModule.expand(textbox.value); +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.ts b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.ts index 37ac2ea5d..c2eb490bc 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/index.ts @@ -1,14 +1,10 @@ - - import { Grid, DetailRow } from '@syncfusion/ej2-grids'; import { Button } from '@syncfusion/ej2-buttons'; import { employeeData } from './datasource.ts'; +import { TextBox } from '@syncfusion/ej2-inputs'; Grid.Inject(DetailRow); -let expandBtn: Button = new Button(); -expandBtn.appendTo('#expand'); - let grid: Grid = new Grid({ dataSource: employeeData, detailTemplate: '#detailtemplate', @@ -22,11 +18,16 @@ let grid: Grid = new Grid({ }); grid.appendTo('#Grid'); -document.getElementById('expand').addEventListener('click', () => { - let inputElem: HTMLInputElement = (document.getElementsByClassName('rowindex')[0] as HTMLInputElement); - let rowIndex: number = parseInt(inputElem.value, 10); - grid.detailRowModule.expand(rowIndex); -}); - +let expandButton: Button = new Button(); +expandButton.appendTo('#expand'); +let textbox: TextBox = new TextBox({ + placeholder: 'Enter the Row Index', + floatLabelType: 'Auto', + width: 250 +}); +textbox.appendTo('#rowindex'); +(document.getElementById('expand')as HTMLElement).addEventListener('click', () => { + grid.detailRowModule.expand(textbox.value); +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/js/index.html b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/js/index.html index 3f72c5071..14e4caf76 100644 --- a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/js/index.html @@ -1,28 +1,22 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + @@ -72,17 +66,14 @@
    -
    -
    - - - -
    - +
    + + +
    +
    - @@ -75,12 +69,11 @@
    Loading....
    -
    - +
    + - -
    - +
    +
    diff --git a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/waitingpopup.gif b/ej2-javascript/code-snippet/grid/detail-template-method-cs1/waitingpopup.gif deleted file mode 100644 index a2eae442e..000000000 Binary files a/ej2-javascript/code-snippet/grid/detail-template-method-cs1/waitingpopup.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/draganddrop-cs1/datasource.ts index c7b6b3d0c..afaf65670 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/datasource.ts @@ -73,210 +73,4 @@ export let data: Object[] = [ 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 - }]; - -export let employeeData: Object[] = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/draganddrop-cs1/es5-datasource.js index 7fc7297c3..955466c83 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/es5-datasource.js @@ -73,210 +73,4 @@ var data = [ 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 - }]; - -var employeeData = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.js b/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.js index aace4f655..4c3452cba 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.js @@ -1,6 +1,6 @@ ej.grids.Grid.Inject(ej.grids.RowDD); var grid = new ej.grids.Grid({ - dataSource: data.slice(0, 5), + dataSource: data, allowRowDragAndDrop: true, rowDropSettings: { targetID: 'DestGrid' }, selectionSettings: { type: 'Multiple' }, @@ -24,5 +24,4 @@ var destGrid = new ej.grids.Grid({ { field: 'ShipName', headerText: 'Ship Name', width: 150 } ] }); -destGrid.appendTo('#DestGrid'); - +destGrid.appendTo('#DestGrid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.ts b/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.ts index 35c6502ab..5fa8377cf 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/index.ts @@ -1,12 +1,10 @@ - - -import { Grid, Page, RowDD, Selection } from '@syncfusion/ej2-grids'; +import { Grid, RowDD, Selection } from '@syncfusion/ej2-grids'; import { data } from './datasource.ts'; -Grid.Inject(Page, RowDD, Selection); +Grid.Inject( RowDD, Selection); let grid: Grid = new Grid({ - dataSource: data.slice(0, 5), + dataSource: data, allowRowDragAndDrop: true, rowDropSettings: { targetID: 'DestGrid' }, selectionSettings: { type: 'Multiple' }, @@ -31,7 +29,4 @@ let destGrid: Grid = new Grid({ { field: 'ShipName', headerText: 'Ship Name', width: 150 } ] }); -destGrid.appendTo('#DestGrid'); - - - +destGrid.appendTo('#DestGrid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/js/index.html b/ej2-javascript/code-snippet/grid/draganddrop-cs1/js/index.html index 0bf127f5b..4a2871a48 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/js/index.html @@ -1,44 +1,36 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + -
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/draganddrop-cs1/systemjs.config.js index 05bf940b7..e32347149 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/draganddrop-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/draganddrop-cs1/ts/index.html index 88d9bfb92..0c495c0cf 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/datasource.ts index 6a46580f3..8a43bef93 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/datasource.ts @@ -1,306 +1,164 @@ -export let data: Object[] = [ +export let sampleGridData: 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 - }]; - - export let hierarchicalData: { [key: string]: Object }[] = [ - { - nodeId: '04', nodeText: 'Pictures', icon: 'folder', expanded: true, - nodeChild: [ - { - nodeId: '04-01', nodeText: 'Users', expanded: true, - nodeChild: [ - { nodeId: '04-01-01', nodeText: 'Smith' }, - { nodeId: '04-01-02', nodeText: 'Admin' }, - { nodeId: '04-01-02', nodeText: 'Public' }, - ] - }, - { nodeId: '04-02', nodeText: 'Windows', - nodeChild: [ - { nodeId: '04-02-01', nodeText: 'Boot' }, - { nodeId: '04-02-02', nodeText: 'FileManager' }, - { nodeId: '04-02-02', nodeText: 'System32' }, - ] - }, - { nodeId: '04-03', nodeText: 'Local Disk(D:)' }, - ] - } - ]; - -export let employeeData: Object[] = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + taskID: 1, + taskName: 'Planning', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + progress: 100, + duration: 5, + priority: 'Normal', + approved: false, + description: 'Task description 1', + category: 'Task category 1', + subtasks: [ + { + taskID: 2, + taskName: 'Plan timeline', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Normal', + approved: false, + }, + { + taskID: 3, + taskName: 'Plan budget', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Low', + approved: true, + }, + { + taskID: 4, + taskName: 'Allocate resources', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Critical', + approved: false, + }, + { + taskID: 5, + taskName: 'Planning complete', + startDate: new Date('02/07/2017'), + endDate: new Date('02/07/2017'), + duration: 0, + progress: 0, + priority: 'Low', + approved: true, + }, + ], + }, + { + taskID: 6, + taskName: 'Design', + startDate: new Date('02/10/2017'), + endDate: new Date('02/14/2017'), + duration: 3, + progress: 86, + priority: 'High', + approved: false, + description: 'Task description 2', + category: 'Task category 2', + subtasks: [ + { + taskID: 7, + taskName: 'Software Specification', + startDate: new Date('02/10/2017'), + endDate: new Date('02/12/2017'), + duration: 3, + progress: 60, + priority: 'Normal', + approved: false, + }, + { + taskID: 8, + taskName: 'Develop prototype', + startDate: new Date('02/10/2017'), + endDate: new Date('02/12/2017'), + duration: 3, + progress: 100, + priority: 'Critical', + approved: false, + }, + { + taskID: 9, + taskName: 'Get approval from customer', + startDate: new Date('02/13/2017'), + endDate: new Date('02/14/2017'), + duration: 2, + progress: 100, + priority: 'Low', + approved: true, + }, + { + taskID: 10, + taskName: 'Design Documentation', + startDate: new Date('02/13/2017'), + endDate: new Date('02/14/2017'), + duration: 2, + progress: 100, + priority: 'High', + approved: true, + }, + { + taskID: 11, + taskName: 'Design complete', + startDate: new Date('02/14/2017'), + endDate: new Date('02/14/2017'), + duration: 0, + progress: 0, + priority: 'Normal', + approved: true, + }, + ], + }, + { + taskID: 12, + taskName: 'Implementation Phase', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'Normal', + approved: false, + description: 'Task description 3', + category: 'Task category 3', + duration: 11, + progress: 66, + subtasks: [ + { + taskID: 13, + taskName: 'Phase 1', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'High', + approved: false, + progress: 50, + duration: 11, + }, + { + taskID: 21, + taskName: 'Phase 2', + startDate: new Date('02/17/2017'), + endDate: new Date('02/28/2017'), + priority: 'High', + approved: false, + duration: 12, + progress: 60, + }, + + { + taskID: 29, + taskName: 'Phase 3', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'Normal', + approved: false, + duration: 11, + progress: 30, + }, + ], + },]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/es5-datasource.js index caf53593b..ee67f31d5 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/es5-datasource.js @@ -1,308 +1,164 @@ -var data = [ - { - 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 - }]; - - -var hierarchicalData = [ - { - nodeId: '04', nodeText: 'Pictures', icon: 'folder', expanded: true, - nodeChild: [ - { - nodeId: '04-01', nodeText: 'Users', expanded: true, - nodeChild: [ - { nodeId: '04-01-01', nodeText: 'Smith' }, - { nodeId: '04-01-02', nodeText: 'Admin' }, - { nodeId: '04-01-02', nodeText: 'Public' }, - ] - }, - { - nodeId: '04-02', nodeText: 'Windows', - nodeChild: [ - { nodeId: '04-02-01', nodeText: 'Boot' }, - { nodeId: '04-02-02', nodeText: 'FileManager' }, - { nodeId: '04-02-02', nodeText: 'System32' }, - ] - }, - { nodeId: '04-03', nodeText: 'Local Disk(D:)' }, - ] - } -]; - -var employeeData = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file +var sampleGridData = [ + { + taskID: 1, + taskName: 'Planning', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + progress: 100, + duration: 5, + priority: 'Normal', + approved: false, + description: 'Task description 1', + category: 'Task category 1', + subtasks: [ + { + taskID: 2, + taskName: 'Plan timeline', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Normal', + approved: false, + }, + { + taskID: 3, + taskName: 'Plan budget', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Low', + approved: true, + }, + { + taskID: 4, + taskName: 'Allocate resources', + startDate: new Date('02/03/2017'), + endDate: new Date('02/07/2017'), + duration: 5, + progress: 100, + priority: 'Critical', + approved: false, + }, + { + taskID: 5, + taskName: 'Planning complete', + startDate: new Date('02/07/2017'), + endDate: new Date('02/07/2017'), + duration: 0, + progress: 0, + priority: 'Low', + approved: true, + }, + ], + }, + { + taskID: 6, + taskName: 'Design', + startDate: new Date('02/10/2017'), + endDate: new Date('02/14/2017'), + duration: 3, + progress: 86, + priority: 'High', + approved: false, + description: 'Task description 2', + category: 'Task category 2', + subtasks: [ + { + taskID: 7, + taskName: 'Software Specification', + startDate: new Date('02/10/2017'), + endDate: new Date('02/12/2017'), + duration: 3, + progress: 60, + priority: 'Normal', + approved: false, + }, + { + taskID: 8, + taskName: 'Develop prototype', + startDate: new Date('02/10/2017'), + endDate: new Date('02/12/2017'), + duration: 3, + progress: 100, + priority: 'Critical', + approved: false, + }, + { + taskID: 9, + taskName: 'Get approval from customer', + startDate: new Date('02/13/2017'), + endDate: new Date('02/14/2017'), + duration: 2, + progress: 100, + priority: 'Low', + approved: true, + }, + { + taskID: 10, + taskName: 'Design Documentation', + startDate: new Date('02/13/2017'), + endDate: new Date('02/14/2017'), + duration: 2, + progress: 100, + priority: 'High', + approved: true, + }, + { + taskID: 11, + taskName: 'Design complete', + startDate: new Date('02/14/2017'), + endDate: new Date('02/14/2017'), + duration: 0, + progress: 0, + priority: 'Normal', + approved: true, + }, + ], + }, + { + taskID: 12, + taskName: 'Implementation Phase', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'Normal', + approved: false, + description: 'Task description 3', + category: 'Task category 3', + duration: 11, + progress: 66, + subtasks: [ + { + taskID: 13, + taskName: 'Phase 1', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'High', + approved: false, + progress: 50, + duration: 11, + }, + { + taskID: 21, + taskName: 'Phase 2', + startDate: new Date('02/17/2017'), + endDate: new Date('02/28/2017'), + priority: 'High', + approved: false, + duration: 12, + progress: 60, + }, + + { + taskID: 29, + taskName: 'Phase 3', + startDate: new Date('02/17/2017'), + endDate: new Date('02/27/2017'), + priority: 'Normal', + approved: false, + duration: 11, + progress: 30, + }, + ], + },]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.js b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.js index 15faa6e50..aef09d55c 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.js @@ -1,40 +1,47 @@ ej.grids.Grid.Inject(ej.grids.RowDD); var grid = new ej.grids.Grid({ - dataSource: data.slice(0, 5), - allowRowDragAndDrop: true, - rowDropSettings: { targetID: 'tree' }, - selectionSettings: { type: 'Multiple' }, - columns: [ - { field: 'OrderID', headerText: 'Order ID',isPrimaryKey: true, textAlign: 'Right', width: 120 }, - { field: 'CustomerID', headerText: 'Customer ID', width: 150 }, - { field: 'ShipCity', headerText: 'Ship City', width: 150 }, - { field: 'ShipName', headerText: 'Ship Name', width: 150 } - ], - rowDrop: function(args){ - var currLi = args.target.closest('li'); - var gridData = args.data; - if(currLi !=null && closest(currLi, '.' + 'e-control').classList.contains('e-tree')) - { - if(gridData != null){ - var grid = (document.getElementById('Grid')).ej2_instances[0]; - var tree = (document.getElementById('tree')).ej2_instances[0]; - for(var i = 0, len = gridData.length; i < len; i++){ - var obj = [{ nodeId:gridData[i].OrderID,nodeText:gridData[i].CustomerID }]; - grid.deleteRow(args.rows[i]); - tree.addNodes(obj,currLi); - } - args.cancel=true; - } - } - } + dataSource: sampleGridData, + allowPaging: true, + pageSettings: true, + allowSelection: true, + allowRowDragAndDrop: true, + rowDropSettings: { targetID: 'TreeGrid' }, + selectionSettings: { type: 'Multiple' }, + editSettings: { allowDeleting: true }, + rowDrop: function (args) { + var grid = document.getElementById('Grid').ej2_instances[0]; + var tree = document.getElementById('TreeGrid').ej2_instances[0]; + if (args.target.closest('.e-treegrid')) { + args.cancel = true; + var rowIndex = + args.target.closest('.e-row') !== null + ? args.target.closest('.e-row').rowIndex + : 0; + for (var i = 0; i < args.data.length; i++) { + tree.addRecord(args.data[i], rowIndex); + grid.deleteRecord('taskID', args.data[i]); + } + } + }, + columns: [ + { field: 'taskID', headerText: 'taskID', textAlign: 'Right', width: 90 }, + { field: 'taskName', headerText: 'taskName', textAlign: 'Left', width: 180 }, + { field: 'description', headerText: 'description', textAlign: 'Left', width: 180 }, + { field: 'category', headerText: 'category', textAlign: 'Left', width: 180 }, + { field: 'startDate', headerText: 'startDate', textAlign: 'Right', format: 'yMd', width: 120 }, + { field: 'duration', headerText: 'duration', textAlign: 'Right', width: 80 } + ], }); -grid.appendTo('#Grid'); - -var treeViewObj = new ej.navigations.TreeView({ - fields: { dataSource: hierarchicalData, id: 'nodeId', text: 'nodeText', - child: 'nodeChild' - }, - }); -treeViewObj.appendTo('#tree'); - +grid.appendTo('#Grid'); +var treeGridObj = new ej.treegrid.TreeGrid({ + childMapping: 'subtasks', + editSettings: { allowAdding: true, allowEditing: true }, + columns: [ + { field: 'taskID', headerText: 'Task ID', width: 90, textAlign: 'Right' }, + { field: 'taskName', headerText: 'Task Name', width: 180, textAlign: 'Left' }, + { field: 'startDate', headerText: 'Start Date', width: 90, textAlign: 'Right', type: 'date', format: 'yMd' }, + { field: 'duration', headerText: 'Duration', width: 80, textAlign: 'Right' } + ], +}); +treeGridObj.appendTo('#TreeGrid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.ts b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.ts index 39f4ec25f..5ca8f308b 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/index.ts @@ -1,47 +1,52 @@ +import { Grid, Page, RowDD, Selection, Edit, RowDragEventArgs } from '@syncfusion/ej2-grids'; +import { TreeGrid, Edit as TreeEdit } from '@syncfusion/ej2-treegrid'; +import { isNullOrUndefined } from '@syncfusion/ej2-base'; +import { sampleGridData } from './datasource.ts'; +Grid.Inject(Page, RowDD, Selection, Edit); +TreeGrid.Inject(TreeEdit); -import { Grid, Page, RowDD, Selection } from '@syncfusion/ej2-grids'; -import { TreeView } from '@syncfusion/ej2-navigations'; -import { data } from './datasource.ts'; - -Grid.Inject(Page, RowDD, Selection); -let hierarchicalData: { [key: string]: Object }[]; let grid: Grid = new Grid({ - dataSource: data.slice(0, 5), - allowRowDragAndDrop: true, - rowDropSettings: { targetID: 'tree' }, - selectionSettings: { type: 'Multiple' }, - columns: [ - { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 120 }, - { field: 'CustomerID', headerText: 'Customer ID', width: 150 }, - { field: 'ShipCity', headerText: 'Ship City', width: 150 }, - { field: 'ShipName', headerText: 'Ship Name', width: 150 } - ], - rowDrop: function(args:any){ - let currLi: Element = args.target.closest('li'); - let gridData: any = args.data; - if(currLi !=null && closest(currLi, '.' + 'e-control').classList.contains('e-treeview')){ - if(gridData != null){ - let grid: any = (document.getElementById('Grid')).ej2_instances[0]; - let tree: any = (document.getElementById('tree')).ej2_instances[0]; - for(let i:number = 0, len = gridData.length; i < len; i++){ - let obj: any = [{ nodeId:gridData[i].OrderID,nodeText:gridData[i].CustomerID }]; - (grid as any).deleteRow(args.rows[i]); - tree.addNodes(obj,currLi); - } - args.cancel=true; - } - } - } + dataSource: sampleGridData, + allowPaging: true, + allowSelection: true, + allowRowDragAndDrop: true, + rowDropSettings: { targetID: 'TreeGrid' }, + selectionSettings: { type: 'Multiple' }, + editSettings: { allowDeleting: true }, + columns: [ + { field: 'taskID', headerText: 'taskID', textAlign: 'Right', width: 90 }, + { field: 'taskName', headerText: 'taskName', textAlign: 'Left', width: 180 }, + { field: 'description', headerText: 'description', textAlign: 'Left', width: 180 }, + { field: 'category', headerText: 'category', textAlign: 'Left', width: 180 }, + { field: 'startDate', headerText: 'startDate', textAlign: 'Right', format: 'yMd', width: 120 }, + { field: 'duration', headerText: 'duration', textAlign: 'Right', width: 80 } + ], + rowDrop: function (args: RowDragEventArgs) { + let grid = (document.getElementById('Grid') as Grid).ej2_instances[0]; + let tree = (document.getElementById('TreeGrid') as TreeGrid).ej2_instances[0]; + if (args.target.closest('.e-treegrid')) { + args.cancel = true; + let rowIndex = !isNullOrUndefined(args.target.closest('.e-row')) + ? args.target.closest('.e-row').rowIndex + : 0; + for (let i = 0; i < args.data.length; i++) { + tree.addRecord(args.data[i], rowIndex); + grid.deleteRecord('taskID', args.data[i]); + } + } + }, }); grid.appendTo('#Grid'); -let treeObj: TreeView = new TreeView({ - fields: { dataSource: hierarchicalData, id: 'nodeId', text: 'nodeText', - child: 'nodeChild' - }, - }); - treeObj.appendTo('#tree'); - - - +let treeGridObj: TreeGrid = new TreeGrid({ + childMapping: 'subtasks', + editSettings: { allowAdding: true, allowEditing: true }, + columns: [ + { field: 'taskID', headerText: 'Task ID', width: 90, textAlign: 'Right' }, + { field: 'taskName', headerText: 'Task Name', width: 180, textAlign: 'Left' }, + { field: 'startDate', headerText: 'Start Date', width: 90, textAlign: 'Right', type: 'date', format: 'yMd' }, + { field: 'duration', headerText: 'Duration', width: 80, textAlign: 'Right' } + ], +}); +treeGridObj.appendTo('#TreeGrid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/js/index.html b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/js/index.html index 5fb8a1f6a..9daa38f17 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/js/index.html @@ -1,44 +1,37 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - +
    -
    +
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/systemjs.config.js index 05bf940b7..37594cfb6 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -28,12 +28,12 @@ System.config({ "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", - "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js", "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", - "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-treegrid": "syncfusion:ej2-treegrid/dist/ej2-treegrid.umd.min.js", + "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/ts/index.html index 5c4a7f9e8..a975b7152 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-custom-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,18 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + @@ -31,7 +27,7 @@
    -
    +
    diff --git a/ej2-javascript/code-snippet/data/getting-started-cs16/datasource.ts b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/datasource.ts similarity index 99% rename from ej2-javascript/code-snippet/data/getting-started-cs16/datasource.ts rename to ej2-javascript/code-snippet/grid/draganddrop-event-cs1/datasource.ts index afaf65670..ada2e0c74 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs16/datasource.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/datasource.ts @@ -73,4 +73,5 @@ export let data: Object[] = [ 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 - }]; \ No newline at end of file + }]; + diff --git a/ej2-javascript/code-snippet/data/getting-started-cs18/es5-datasource.js b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/es5-datasource.js similarity index 99% rename from ej2-javascript/code-snippet/data/getting-started-cs18/es5-datasource.js rename to ej2-javascript/code-snippet/grid/draganddrop-event-cs1/es5-datasource.js index 955466c83..c1223dc0b 100644 --- a/ej2-javascript/code-snippet/data/getting-started-cs18/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/es5-datasource.js @@ -73,4 +73,5 @@ var data = [ 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 - }]; \ No newline at end of file + }]; + diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.css b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.css new file mode 100644 index 000000000..089631701 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.css @@ -0,0 +1,18 @@ +#container { + visibility: hidden; +} + +#loader { +color: #008cff; +font-family: 'Helvetica Neue','calibiri'; +font-size: 14px; +height: 40px; +left: 45%; +position: absolute; +top: 45%; +width: 30%; +} + +#Grid { +margin-bottom: 20px; +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.js b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.js new file mode 100644 index 000000000..20eaf7440 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.js @@ -0,0 +1,38 @@ +ej.grids.Grid.Inject(ej.grids.RowDD); +var grid = new ej.grids.Grid({ + dataSource: data, + allowPaging: true, + allowRowDragAndDrop: true, + selectionSettings: { type: 'Multiple' }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' }, + { field: 'CustomerID', headerText: 'Customer ID', width: 130 }, + { field: 'OrderDate', headerText: 'Order Date', width: 120, format: 'yMd', textAlign: 'Right' }, + { field: 'Freight', headerText: 'Freight', width: 120, format: 'C2', textAlign: 'Right' } + ], + rowDragStartHelper: function (args) { + document.getElementById('message').innerText = `rowDragStartHelper event triggered`; + if (args.data[0].OrderID === 10248) { + args.cancel = true; + } + }, + rowDragStart: function (args) { + document.getElementById('message').innerText = `rowDragStart event triggered`; + args.cancel = true; + }, + rowDrag: function (args) { + document.getElementById('message').innerText = `rowDrag event triggered`; + args.rows.forEach((row) => { + row.classList.add('drag-limit'); + }); + }, + rowDrop: function (args) { + document.getElementById('message').innerText = `rowDrop event triggered`; + var value = []; + for (var index = 0; index < args.rows.length; index++) { + value.push(args.fromIndex + index); + } + grid.reorderRows(value, args.dropIndex); + }, + }); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.ts b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.ts new file mode 100644 index 000000000..35d4ee2aa --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/index.ts @@ -0,0 +1,42 @@ +import { Grid, RowDD, Selection, Page, RowDragEventArgs } from '@syncfusion/ej2-grids'; +import { data } from './datasource.ts'; + +Grid.Inject(RowDD, Selection, Page ); + +let grid: Grid = new Grid({ + dataSource: data, + allowRowDragAndDrop: true, + allowPaging: true, + selectionSettings: { type: 'Multiple' }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' }, + { field: 'CustomerID', headerText: 'Customer ID', width: 130 }, + { field: 'OrderDate', headerText: 'Order Date', width: 120, format: 'yMd', textAlign: 'Right' }, + { field: 'Freight', headerText: 'Freight', width: 120, format: 'C2', textAlign: 'Right' } + ], + rowDragStart: function (args: RowDragEventArgs) { + (document.getElementById('message') as HTMLElement).innerText = `rowDragStart event triggered`; + args.cancel = true; + }, + rowDragStartHelper: function (args: RowDragEventArgs) { + (document.getElementById('message') as HTMLElement).innerText = `rowDragStartHelper event triggered`; + if (args.data[0].OrderID === 10248) { + args.cancel = true; + } + }, + rowDrag: function (args: RowDragEventArgs) { + (document.getElementById('message') as HTMLElement).innerText = `rowDrag event triggered`; + args.rows.forEach((row) => { + row.classList.add('drag-limit'); + }); + }, + rowDrop: function (args: RowDragEventArgs) { + (document.getElementById('message') as HTMLElement).innerText = `rowDrop event triggered`; + let value = []; + for (let index = 0; index < args.rows.length; index++) { + value.push(args.fromIndex + index); + } + grid.reorderRows(value, args.dropIndex); + }, + }); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/js/index.html b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/js/index.html new file mode 100644 index 000000000..53d9d4013 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/js/index.html @@ -0,0 +1,44 @@ + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +
    + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/systemjs.config.js new file mode 100644 index 000000000..da871f163 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/systemjs.config.js @@ -0,0 +1,39 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js", + "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js", + "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js", + "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js", + "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js" + } +}); +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/ts/index.html new file mode 100644 index 000000000..8668754ae --- /dev/null +++ b/ej2-javascript/code-snippet/grid/draganddrop-event-cs1/ts/index.html @@ -0,0 +1,43 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + +
    Loading....
    +
    +
    +

    +
    +
    +
    + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/datasource.ts index c7b6b3d0c..afaf65670 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/datasource.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/datasource.ts @@ -73,210 +73,4 @@ export let data: Object[] = [ 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 - }]; - -export let employeeData: Object[] = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/es5-datasource.js index 7fc7297c3..955466c83 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/es5-datasource.js @@ -73,210 +73,4 @@ var data = [ 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 - }]; - -var employeeData = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.js index e52a06b7c..e02e7eeb5 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.js @@ -1,14 +1,16 @@ ej.grids.Grid.Inject(ej.grids.RowDD); var grid = new ej.grids.Grid({ - dataSource: data.slice(0, 10), + dataSource: data, allowRowDragAndDrop: true, selectionSettings: { type: 'Multiple'}, + height: 400, columns: [ - { field: 'OrderID', headerText: 'Order ID',isPrimaryKey: true, textAlign: 'Right', width: 120 }, - { field: 'CustomerID', headerText: 'Customer ID', width: 150 }, - { field: 'ShipCity', headerText: 'Ship City', width: 150 }, - { field: 'ShipName', headerText: 'Ship Name', width: 150 } + { field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' }, + { field: 'CustomerID', headerText: 'Customer ID', width: 120 }, + { field: 'OrderDate', headerText: 'Order Date', width: 100, format:'yMd', textAlign: 'Right' }, + { field: 'Freight', headerText: 'Freight', width: 120, format:'C2', textAlign: 'Right' }, + { field: 'ShipCity', headerText: 'Ship City', width: 130 }, + { field: 'ShipCountry', headerText: 'Ship Country', width: 130 } ] }); -grid.appendTo('#Grid'); - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.ts b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.ts index 2fbf7043f..3723825b8 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/index.ts @@ -1,5 +1,3 @@ - - import { Grid, RowDD, Selection } from '@syncfusion/ej2-grids'; import { data } from './datasource.ts'; @@ -8,16 +6,15 @@ Grid.Inject(RowDD, Selection); let grid: Grid = new Grid({ dataSource: data, allowRowDragAndDrop: true, - heigth:300, selectionSettings: { type: 'Multiple' }, + height: 400, columns: [ - { field: 'OrderID', headerText: 'Order ID', isPrimaryKey: true, textAlign: 'Right', width: 120 }, - { field: 'CustomerID', headerText: 'Customer ID', width: 150 }, - { field: 'ShipCity', headerText: 'Ship City', width: 150 }, - { field: 'ShipName', headerText: 'Ship Name', width: 150 } + { field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right'}, + { field: 'CustomerID', headerText: 'Customer ID', width: 120 }, + { field: 'OrderDate', headerText: 'Order Date', width: 100, format:'yMd', textAlign: 'Right' }, + { field: 'Freight', headerText: 'Freight', width: 120, format:'C2', textAlign: 'Right' }, + { field: 'ShipCity', headerText: 'Ship City', width: 130 }, + { field: 'ShipCountry', headerText: 'Ship Country', width: 130 } ] }); -grid.appendTo('#Grid'); - - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/js/index.html b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/js/index.html index d333dae27..d9433d3c3 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/js/index.html @@ -1,43 +1,35 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + -
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/systemjs.config.js index 05bf940b7..e32347149 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/ts/index.html index 293a3035e..4f9b6d6df 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/datasource.ts b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/datasource.ts index c7b6b3d0c..afaf65670 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/datasource.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/datasource.ts @@ -73,210 +73,4 @@ export let data: Object[] = [ 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 - }]; - -export let employeeData: Object[] = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/es5-datasource.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/es5-datasource.js index 7fc7297c3..955466c83 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/es5-datasource.js @@ -73,210 +73,4 @@ var data = [ 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 - }]; - -var employeeData = [{ - 'EmployeeID': 1, - 'LastName': 'Davolio', - 'FirstName': 'Nancy', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-664743600000), - 'HireDate': new Date(704692800000), - 'Address': '507 - 20th Ave. E.\r\nApt. 2A', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98122', - 'Country': 'USA', - 'HomePhone': '(206) 555-9857', - 'Extension': '5467', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Education includes a BA in psychology from Colorado State University in 1970. She also completed\ - \'The Art of the Cold Call.\' Nancy is a member of Toastmasters International.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 2, - 'LastName': 'Fuller', - 'FirstName': 'Andrew', - 'Title': 'Vice President, Sales', - 'TitleOfCourtesy': 'Dr.', - 'BirthDate': new Date(-563828400000), - 'HireDate': new Date(713764800000), - 'Address': '908 W. Capital Way', - 'City': 'Tacoma', - 'Region': 'WA', - 'PostalCode': '98401', - 'Country': 'USA', - 'HomePhone': '(206) 555-9482', - 'Extension': '3457', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of \ - Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, \ - was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the \ - Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.', - 'ReportsTo': 0, - 'PhotoPath': 'http://accweb/emmployees/fuller.bmp' -}, -{ - 'EmployeeID': 3, - 'LastName': 'Leverling', - 'FirstName': 'Janet', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-200088000000), - 'HireDate': new Date(702104400000), - 'Address': '722 Moss Bay Blvd.', - 'City': 'Kirkland', - 'Region': 'WA', - 'PostalCode': '98033', - 'Country': 'USA', - 'HomePhone': '(206) 555-3412', - 'Extension': '3355', - 'Photo': { 'Length': 21722 }, - - 'Notes': 'Janet has a BS degree in chemistry from Boston College (1984). \ - She has also completed a certificate program in food retailing management.\ - Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/leverling.bmp' -}, -{ - 'EmployeeID': 4, - 'LastName': 'Peacock', - 'FirstName': 'Margaret', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mrs.', - 'BirthDate': new Date(-1018814400000), - 'HireDate': new Date(736401600000), - 'Address': '4110 Old Redmond Rd.', - 'City': 'Redmond', - 'Region': 'WA', - 'PostalCode': '98052', - 'Country': 'USA', - 'HomePhone': '(206) 555-8122', - 'Extension': '5176', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American \ - Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/peacock.bmp' -}, -{ - 'EmployeeID': 5, - 'LastName': 'Buchanan', - 'FirstName': 'Steven', - 'Title': 'Sales Manager', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-468010800000), - 'HireDate': new Date(750830400000), - 'Address': '14 Garrett Hill', - 'City': 'London', - 'Region': null, - 'PostalCode': - 'SW1 8JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-4848', - 'Extension': '3453', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as \ - a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent \ - post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses \'Successful \ - Telemarketing\' and \'International Sales Management.\' He is fluent in French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/buchanan.bmp' -}, -{ - 'EmployeeID': 6, - 'LastName': 'Suyama', - 'FirstName': 'Michael', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-205185600000), - 'HireDate': new Date(750830400000), - 'Address': 'Coventry House\r\nMiner Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'EC2 7JR', - 'Country': 'UK', - 'HomePhone': '(71) 555-7773', - 'Extension': '428', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles \ - (MBA, marketing, 1986). He has also taken the courses \'Multi-Cultural Selling\' and \'Time Management for the Sales Professional.\' \ - He is fluent in Japanese and can read and write French, Portuguese, and Spanish.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 7, - 'LastName': 'King', - 'FirstName': 'Robert', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Mr.', - 'BirthDate': new Date(-302731200000), - 'HireDate': new Date(757486800000), - 'Address': 'Edgeham Hollow\r\nWinchester Way', - 'City': 'London', - 'Region': null, - 'PostalCode': 'RG1 9SP', - 'Country': 'UK', - 'HomePhone': '(71) 555-5598', - 'Extension': '465', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the \ - University of Michigan in 1992, the year he joined the company. After completing a course entitled \'Selling in Europe,\' \ - he was transferred to the London office in March 1993.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 8, - 'LastName': 'Callahan', - 'FirstName': 'Laura', - 'Title': 'Inside Sales Coordinator', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-377982000000), - 'HireDate': new Date(762843600000), - 'Address': '4726 - 11th Ave. N.E.', - 'City': 'Seattle', - 'Region': 'WA', - 'PostalCode': '98105', - 'Country': 'USA', - 'HomePhone': '(206) 555-1189', - 'Extension': '2344', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Laura received a BA in psychology from the University of Washington. She has also completed a course in business \ - French. She reads and writes French.', - 'ReportsTo': 2, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}, -{ - 'EmployeeID': 9, - 'LastName': 'Dodsworth', - 'FirstName': 'Anne', - 'Title': 'Sales Representative', - 'TitleOfCourtesy': 'Ms.', - 'BirthDate': new Date(-123966000000), - 'HireDate': new Date(784875600000), - 'Address': '7 Houndstooth Rd.', - 'City': 'London', - 'Region': null, - 'PostalCode': 'WG2 7LT', - 'Country': 'UK', - 'HomePhone': '(71) 555-4444', - 'Extension': '452', - 'Photo': { 'Length': 21626 }, - - 'Notes': 'Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.', - 'ReportsTo': 5, - 'PhotoPath': 'http://accweb/emmployees/davolio.bmp' -}]; \ No newline at end of file + }]; \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.js index 3a7a78f7a..a1299d138 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.js @@ -1,41 +1,24 @@ +ej.grids.Grid.Inject(ej.grids.RowDD); var grid = new ej.grids.Grid({ dataSource: data, allowRowDragAndDrop: true, - allowPaging: true, rowDropSettings: { targetID: 'Grid' }, selectionSettings: { type: 'Multiple' }, - pageSettings: { pageSize: 10 }, - height: 300, columns: [ - - { - field: 'OrderID',headerText: 'Order ID',isPrimaryKey: true,width: 80,textAlign: 'Right', - }, - { - field: 'CustomerID',headerText: 'Customer Name',width: 130,textAlign: 'Left', - }, - { - field: 'OrderDate',headerText: 'Order Date',width: 120,format: 'yMd',textAlign: 'Right', - }, - { - field: 'Freight',headerText: 'Freight',width: 130,format: 'C2',textAlign: 'Right', - }, - { - field: 'ShipCity',headerText: 'Ship City',width: 130,textAlign: 'Left', - }, - { - field: 'ShipCountry', headerText: 'Ship Country', width: 150 - }, + { field: 'OrderID',headerText: 'Order ID', width: 120,textAlign: 'Right' }, + { field: 'CustomerID',headerText: 'Customer Name',width: 130 }, + { field: 'OrderDate',headerText: 'Order Date',width: 120,format: 'yMd',textAlign: 'Right' }, + { field: 'Freight',headerText: 'Freight',width: 120,format: 'C2',textAlign: 'Right' }, + { field: 'ShipCity',headerText: 'Ship City',width: 130 }, + { field: 'ShipCountry', headerText: 'Ship Country', width: 130 }, ], rowDrop: (args) => { args.cancel = true; var value = []; - for (var r = 0; r < args.rows.length; r++) { - value.push(args.fromIndex + r); + for (var index = 0; index < args.rows.length; index++) { + value.push(args.fromIndex + index); } grid.reorderRows(value, args.dropIndex); }, }); -grid.appendTo('#Grid'); - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.ts b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.ts index aad1d1103..dc93e083f 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.ts +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/index.ts @@ -1,48 +1,28 @@ - - -import { Grid, Page, RowDD, Selection } from '@syncfusion/ej2-grids'; +import { Grid, RowDD, Selection, RowDragEventArgs } from '@syncfusion/ej2-grids'; import { data } from './datasource.ts'; -Grid.Inject(RowDD,Page, Selection); +Grid.Inject(RowDD, Selection); let grid: Grid = new Grid({ dataSource: data, allowRowDragAndDrop: true, - allowPaging: true, rowDropSettings: { targetID: 'Grid' }, selectionSettings: { type: 'Multiple' }, - pageSettings: { pageSize: 10 }, - height: 300, columns: [ - { - field: 'OrderID',headerText: 'Order ID',isPrimaryKey: true,width: 80,textAlign: 'Center', - }, - { - field: 'CustomerID',headerText: 'Customer Name',width: 130,textAlign: 'Center', - }, - { - field: 'OrderDate',headerText: 'Order Date',width: 120,format: 'yMd',textAlign: 'Center', - }, - { - field: 'Freight',headerText: 'Freight',width: 130,format: 'C2',textAlign: 'Center', - }, - { - field: 'ShipCity',headerText: 'Ship City',width: 130,textAlign: 'Center', - }, - { - field: 'ShipCountry', headerText: 'Ship Country', width: 150 - }, + { field: 'OrderID',headerText: 'Order ID', width: 120,textAlign: 'Right' }, + { field: 'CustomerID',headerText: 'Customer Name',width: 130 }, + { field: 'OrderDate',headerText: 'Order Date',width: 120,format: 'yMd',textAlign: 'Right' }, + { field: 'Freight',headerText: 'Freight',width: 120,format: 'C2',textAlign: 'Right' }, + { field: 'ShipCity',headerText: 'Ship City',width: 130 }, + { field: 'ShipCountry', headerText: 'Ship Country', width: 130 }, ], - rowDrop: function(args:any){ + rowDrop: function(args:RowDragEventArgs){ args.cancel = true; let value = []; - for (let r = 0; r < args.rows.length; r++) { - value.push(args.fromIndex + r); + for (let index = 0; index < args.rows.length; index++) { + value.push(args.fromIndex + index); } grid.reorderRows(value, args.dropIndex); } }); -grid.appendTo('#Grid'); - - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/js/index.html b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/js/index.html index d333dae27..c6599dc16 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/js/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/js/index.html @@ -5,39 +5,30 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + -
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/systemjs.config.js b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/systemjs.config.js index 05bf940b7..e32347149 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -33,7 +33,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/ts/index.html b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/ts/index.html index 293a3035e..4f9b6d6df 100644 --- a/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/ts/index.html +++ b/ej2-javascript/code-snippet/grid/draganddrop-single-cs2/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.js b/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.js index bd846b2b4..5c8f02110 100644 --- a/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.js +++ b/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.js @@ -1,31 +1,31 @@ var grid = new ej.grids.Grid({ - dataSource: columnSpanData, - queryCellInfo: QueryCellEvent, - gridLines: 'Both', - columns: [ -{ field: 'EmployeeID', headerText: 'Employee ID', isPrimaryKey: true, textAlign: 'Right', width: 120 }, - { field: 'EmployeeName', headerText: 'Employee Name', width: 200 }, - { field: '9:00', headerText: '9.00 AM', width: 100 }, - { field: '9:30', headerText: '9.30 AM', width: 100 }, - { field: '10:00', headerText: '10.00 AM', width: 100 }, - { field: '10:30', headerText: '10.30 AM', width: 100 }, - { field: '11:00', headerText: '11.00 AM', width: 100 }, - { field: '11:30', headerText: '11.30 AM', width: 100 }, - { field: '12:00', headerText: '12.00 PM', width: 100 }, - { field: '12:30', headerText: '12.30 PM', width: 100 }, - { field: '1:00', headerText: '1.00 PM', width: 120 }, - { field: '1:30', headerText: '1.30 PM', width: 120 }, - { field: '2:00', headerText: '2.00 PM', width: 120 }, - { field: '2:30', headerText: '2.30 PM', width: 120 }, - { field: '3:00', headerText: '3.00 PM', width: 120 }, - { field: '3:30', headerText: '3.30 PM', width: 120 }, - { field: '4:00', headerText: '4.00 PM', width: 100 }, - { field: '4:30', headerText: '4.30 PM', width: 100 }, - { field: '5:00', headerText: '5.00 PM', width: 100 } - ], - width: 'auto', - height: 300, - allowTextWrap: true + dataSource: columnSpanData, + queryCellInfo: QueryCellEvent, + gridLines: 'Both', + columns: [ + { field: 'EmployeeID', headerText: 'Employee ID', isPrimaryKey: true, textAlign: 'Right', width: 150 }, + { field: 'EmployeeName', headerText: 'Employee Name', width: 200 }, + { field: '9:00', headerText: '9.00 AM', width: 120 }, + { field: '9:30', headerText: '9.30 AM', width: 120 }, + { field: '10:00', headerText: '10.00 AM', width: 120 }, + { field: '10:30', headerText: '10.30 AM', width: 120 }, + { field: '11:00', headerText: '11.00 AM', width: 120 }, + { field: '11:30', headerText: '11.30 AM', width: 120 }, + { field: '12:00', headerText: '12.00 PM', width: 120 }, + { field: '12:30', headerText: '12.30 PM', width: 120 }, + { field: '1:00', headerText: '1.00 PM', width: 120 }, + { field: '1:30', headerText: '1.30 PM', width: 120 }, + { field: '2:00', headerText: '2.00 PM', width: 120 }, + { field: '2:30', headerText: '2.30 PM', width: 120 }, + { field: '3:00', headerText: '3.00 PM', width: 120 }, + { field: '3:30', headerText: '3.30 PM', width: 120 }, + { field: '4:00', headerText: '4.00 PM', width: 120 }, + { field: '4:30', headerText: '4.30 PM', width: 120 }, + { field: '5:00', headerText: '5.00 PM', width: 120 } + ], + width: 'auto', + height: 300, + allowTextWrap: true }); grid.appendTo('#Grid'); @@ -116,5 +116,4 @@ function QueryCellEvent(args) { } break; } -} - +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.ts b/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.ts index 185e84276..6541edfa5 100644 --- a/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.ts +++ b/ej2-javascript/code-snippet/grid/row-spanning-cs1/index.ts @@ -1,43 +1,39 @@ - - -import { Grid } from '@syncfusion/ej2-grids'; +import { Grid, QueryCellInfoEventArgs } from '@syncfusion/ej2-grids'; import { columnSpanData, ColumnSpanDataType } from './datasource.ts'; let grid: Grid = new Grid({ - dataSource: columnSpanData, - queryCellInfo: QueryCellEvent, - gridLines: 'Both', - columns: [ - { field: 'EmployeeID', headerText: 'Employee ID', isPrimaryKey: true, textAlign: 'Right', width: 120 }, - { field: 'EmployeeName', headerText: 'Employee Name', width: 200 }, - { field: '9:00', headerText: '9.00 AM', width: 100 }, - { field: '9:30', headerText: '9.30 AM', width: 100 }, - { field: '10:00', headerText: '10.00 AM', width: 100 }, - { field: '10:30', headerText: '10.30 AM', width: 100 }, - { field: '11:00', headerText: '11.00 AM', width: 100 }, - { field: '11:30', headerText: '11.30 AM', width: 100 }, - { field: '12:00', headerText: '12.00 PM', width: 100 }, - { field: '12:30', headerText: '12.30 PM', width: 100 }, - { field: '1:00', headerText: '1.00 PM', width: 120 }, - { field: '1:30', headerText: '1.30 PM', width: 120 }, - { field: '2:00', headerText: '2.00 PM', width: 120 }, - { field: '2:30', headerText: '2.30 PM', width: 120 }, - { field: '3:00', headerText: '3.00 PM', width: 120 }, - { field: '3:30', headerText: '3.30 PM', width: 120 }, - { field: '4:00', headerText: '4.00 PM', width: 100 }, - { field: '4:30', headerText: '4.30 PM', width: 100 }, - { field: '5:00', headerText: '5.00 PM', width: 100 } - ], - width: 'auto', - height: 300, - allowTextWrap: true + dataSource: columnSpanData, + queryCellInfo: QueryCellEvent, + gridLines: 'Both', + columns: [ + { field: 'EmployeeID', headerText: 'Employee ID', isPrimaryKey: true, textAlign: 'Right', width: 150 }, + { field: 'EmployeeName', headerText: 'Employee Name', width: 200 }, + { field: '9:00', headerText: '9.00 AM', width: 120 }, + { field: '9:30', headerText: '9.30 AM', width: 120 }, + { field: '10:00', headerText: '10.00 AM', width: 120 }, + { field: '10:30', headerText: '10.30 AM', width: 120 }, + { field: '11:00', headerText: '11.00 AM', width: 120 }, + { field: '11:30', headerText: '11.30 AM', width: 120 }, + { field: '12:00', headerText: '12.00 PM', width: 120 }, + { field: '12:30', headerText: '12.30 PM', width: 120 }, + { field: '1:00', headerText: '1.00 PM', width: 120 }, + { field: '1:30', headerText: '1.30 PM', width: 120 }, + { field: '2:00', headerText: '2.00 PM', width: 120 }, + { field: '2:30', headerText: '2.30 PM', width: 120 }, + { field: '3:00', headerText: '3.00 PM', width: 120 }, + { field: '3:30', headerText: '3.30 PM', width: 120 }, + { field: '4:00', headerText: '4.00 PM', width: 120 }, + { field: '4:30', headerText: '4.30 PM', width: 120 }, + { field: '5:00', headerText: '5.00 PM', width: 120 } + ], + width: 'auto', + height: 300, + allowTextWrap: true }); grid.appendTo('#Grid'); function QueryCellEvent(args: QueryCellInfoEventArgs): void { let data: ColumnSpanDataType = args.data as ColumnSpanDataType; - // Prevent the spanning in second page - if (this.pageSettings.currentPage != 2 && (!args.requestType || args.requestType === 'paging')) { switch (data.EmployeeID) { case 10001: if (args.column.field === '9:00' || args.column.field === '2:30' || args.column.field === '4:30') { @@ -122,9 +118,5 @@ function QueryCellEvent(args: QueryCellInfoEventArgs): void { args.colSpan = 2; } break; - } } -} - - - +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-spanning-cs1/js/index.html b/ej2-javascript/code-snippet/grid/row-spanning-cs1/js/index.html index 857ad399e..2cc492324 100644 --- a/ej2-javascript/code-snippet/grid/row-spanning-cs1/js/index.html +++ b/ej2-javascript/code-snippet/grid/row-spanning-cs1/js/index.html @@ -1,41 +1,33 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - +
    - + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-spanning-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/row-spanning-cs1/systemjs.config.js index cf44bba24..7a695ca08 100644 --- a/ej2-javascript/code-snippet/grid/row-spanning-cs1/systemjs.config.js +++ b/ej2-javascript/code-snippet/grid/row-spanning-cs1/systemjs.config.js @@ -10,7 +10,7 @@ System.config({ } }, paths: { - "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" }, map: { main: "index.ts", @@ -34,7 +34,6 @@ System.config({ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js" } }); - System.import('index.ts').catch(console.error.bind(console)).then(function () { document.getElementById('loader').style.display = "none"; document.getElementById('container').style.visibility = "visible"; diff --git a/ej2-javascript/code-snippet/grid/row-spanning-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/row-spanning-cs1/ts/index.html index c0bb443f8..ba154c578 100644 --- a/ej2-javascript/code-snippet/grid/row-spanning-cs1/ts/index.html +++ b/ej2-javascript/code-snippet/grid/row-spanning-cs1/ts/index.html @@ -1,6 +1,5 @@ - EJ2 Grid @@ -8,21 +7,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/datasource.ts b/ej2-javascript/code-snippet/grid/row-template-component-cs1/datasource.ts new file mode 100644 index 000000000..fa33d7f12 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/datasource.ts @@ -0,0 +1,253 @@ +export let data: Object[] = [ + { + OrderID: 10248, + CustomerID: 'VINET', + EmployeeID: 5, + OrderDate: '1996-07-04T00:00:00Z', + RequiredDate: '1996-08-01T00:00:00Z', + ShippedDate: '1996-07-16T00:00:00Z', + OrderStatus: 'Order Placed', + ShipVia: 3, + Freight: 32.38, + ShipName: 'Vins et alcools Chevalier', + ShipAddress: "59 rue de l'Abbaye", + ShipCity: 'Reims', + ShipRegion: null, + ShipPostalCode: '51100', + ShipCountry: 'France', + Quantity: '1' + }, + { + OrderID: 10249, + CustomerID: 'TOMSP', + EmployeeID: 6, + OrderDate: '1996-07-05T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-10T00:00:00Z', + ShipVia: 1, + Freight: 11.61, + ShipName: 'Toms Spezialit\u00e4ten', + ShipAddress: 'Luisenstr. 48', + ShipCity: 'M\u00fcnster', + ShipRegion: null, + ShipPostalCode: '44087', + ShipCountry: 'Germany', + OrderStatus: 'Processing', + Quantity: '3' + }, + { + OrderID: 10250, + CustomerID: 'HANAR', + EmployeeID: 4, + OrderDate: '1996-07-08T00:00:00Z', + RequiredDate: '1996-08-05T00:00:00Z', + ShippedDate: '1996-07-12T00:00:00Z', + ShipVia: 2, + Freight: 65.83, + ShipName: 'Hanari Carnes', + ShipAddress: 'Rua do Pa\u00e7o, 67', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '05454-876', + ShipCountry: 'Brazil', + OrderStatus: 'Order Placed', + Quantity: '5' + }, + { + OrderID: 10251, + CustomerID: 'VICTE', + EmployeeID: 3, + OrderDate: '1996-07-08T00:00:00Z', + RequiredDate: '1996-08-05T00:00:00Z', + ShippedDate: '1996-07-15T00:00:00Z', + ShipVia: 1, + Freight: 41.34, + ShipName: 'Victuailles en stock', + ShipAddress: '2, rue du Commerce', + ShipCity: 'Lyon', + ShipRegion: null, + ShipPostalCode: '69004', + ShipCountry: 'France', + OrderStatus: 'Order Placed', + Quantity: '6' + }, + { + OrderID: 10252, + CustomerID: 'SUPRD', + EmployeeID: 4, + OrderDate: '1996-07-09T00:00:00Z', + RequiredDate: '1996-08-06T00:00:00Z', + ShippedDate: '1996-07-11T00:00:00Z', + ShipVia: 2, + Freight: 51.3, + ShipName: 'Supr\u00eames d\u00e9lices', + ShipAddress: 'Boulevard Tirou, 255', + ShipCity: 'Charleroi', + ShipRegion: null, + ShipPostalCode: 'B-6000', + ShipCountry: 'Belgium', + OrderStatus: 'Processing', + Quantity: '5' + }, + { + OrderID: 10253, + CustomerID: 'HANAR', + EmployeeID: 3, + OrderDate: '1996-07-10T00:00:00Z', + RequiredDate: '1996-07-24T00:00:00Z', + ShippedDate: '1996-07-16T00:00:00Z', + ShipVia: 2, + Freight: 58.17, + ShipName: 'Hanari Carnes', + ShipAddress: 'Rua do Pa\u00e7o, 67', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '05454-876', + ShipCountry: 'Brazil', + OrderStatus: 'Processing', + Quantity: '7' + }, + { + OrderID: 10254, + CustomerID: 'CHOPS', + EmployeeID: 5, + OrderDate: '1996-07-11T00:00:00Z', + RequiredDate: '1996-08-08T00:00:00Z', + ShippedDate: '1996-07-23T00:00:00Z', + ShipVia: 2, + Freight: 22.98, + ShipName: 'Chop-suey Chinese', + ShipAddress: 'Hauptstr. 31', + ShipCity: 'Bern', + ShipRegion: null, + ShipPostalCode: '3012', + ShipCountry: 'Switzerland', + OrderStatus: 'Order Placed', + Quantity: '8' + }, + { + OrderID: 10255, + CustomerID: 'RICSU', + EmployeeID: 9, + OrderDate: '1996-07-12T00:00:00Z', + RequiredDate: '1996-08-09T00:00:00Z', + ShippedDate: '1996-07-15T00:00:00Z', + ShipVia: 3, + Freight: 148.33, + ShipName: 'Richter Supermarkt', + ShipAddress: 'Starenweg 5', + ShipCity: 'Gen\u00e8ve', + ShipRegion: null, + ShipPostalCode: '1204', + ShipCountry: 'Switzerland', + OrderStatus: 'Processing', + Quantity: '8' + }, + { + OrderID: 10256, + CustomerID: 'WELLI', + EmployeeID: 3, + OrderDate: '1996-07-15T00:00:00Z', + RequiredDate: '1996-08-12T00:00:00Z', + ShippedDate: '1996-07-17T00:00:00Z', + ShipVia: 2, + Freight: 13.97, + ShipName: 'Wellington Importadora', + ShipAddress: 'Rua do Mercado, 12', + ShipCity: 'Resende', + ShipRegion: 'SP', + ShipPostalCode: '08737-363', + ShipCountry: 'Brazil', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10257, + CustomerID: 'HILAA', + EmployeeID: 4, + OrderDate: '1996-07-16T00:00:00Z', + RequiredDate: '1996-08-13T00:00:00Z', + ShippedDate: '1996-07-22T00:00:00Z', + ShipVia: 3, + Freight: 81.91, + ShipName: 'HILARION-Abastos', + ShipAddress: 'Carrera 22 con Ave. Carlos Soublette #8-35', + ShipCity: 'San Crist\u00f3bal', + ShipRegion: 'T\u00e1chira', + ShipPostalCode: '5022', + ShipCountry: 'Venezuela', + OrderStatus: 'Processing', + Quantity: '1' + }, + { + OrderID: 10258, + CustomerID: 'ERNSH', + EmployeeID: 1, + OrderDate: '1996-07-17T00:00:00Z', + RequiredDate: '1996-08-14T00:00:00Z', + ShippedDate: '1996-07-23T00:00:00Z', + ShipVia: 1, + Freight: 140.51, + ShipName: 'Ernst Handel', + ShipAddress: 'Kirchgasse 6', + ShipCity: 'Graz', + ShipRegion: null, + ShipPostalCode: '8010', + ShipCountry: 'Austria', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10259, + CustomerID: 'CENTC', + EmployeeID: 4, + OrderDate: '1996-07-18T00:00:00Z', + RequiredDate: '1996-08-15T00:00:00Z', + ShippedDate: '1996-07-25T00:00:00Z', + ShipVia: 3, + Freight: 3.25, + ShipName: 'Centro comercial Moctezuma', + ShipAddress: 'Sierras de Granada 9993', + ShipCity: 'M\u00e9xico D.F.', + ShipRegion: null, + ShipPostalCode: '05022', + ShipCountry: 'Mexico', + OrderStatus: 'Processing', + Quantity: '1' + }, + { + OrderID: 10260, + CustomerID: 'OTTIK', + EmployeeID: 4, + OrderDate: '1996-07-19T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-29T00:00:00Z', + ShipVia: 1, + Freight: 55.09, + ShipName: 'Ottilies K\u00e4seladen', + ShipAddress: 'Mehrheimerstr. 369', + ShipCity: 'K\u00f6ln', + ShipRegion: null, + ShipPostalCode: '50739', + ShipCountry: 'Germany', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10261, + CustomerID: 'QUEDE', + EmployeeID: 4, + OrderDate: '1996-07-19T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-30T00:00:00Z', + ShipVia: 2, + Freight: 3.05, + ShipName: 'Que Del\u00edcia', + ShipAddress: 'Rua da Panificadora, 12', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '02389-673', + ShipCountry: 'Brazil', + OrderStatus: 'Processing', + Quantity: '1' + }]; diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/es5-datasource.js b/ej2-javascript/code-snippet/grid/row-template-component-cs1/es5-datasource.js new file mode 100644 index 000000000..a451c04b9 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/es5-datasource.js @@ -0,0 +1,253 @@ +var data = [ + { + OrderID: 10248, + CustomerID: 'VINET', + EmployeeID: 5, + OrderDate: '1996-07-04T00:00:00Z', + RequiredDate: '1996-08-01T00:00:00Z', + ShippedDate: '1996-07-16T00:00:00Z', + OrderStatus: 'Order Placed', + ShipVia: 3, + Freight: 32.38, + ShipName: 'Vins et alcools Chevalier', + ShipAddress: "59 rue de l'Abbaye", + ShipCity: 'Reims', + ShipRegion: null, + ShipPostalCode: '51100', + ShipCountry: 'France', + Quantity: '1' + }, + { + OrderID: 10249, + CustomerID: 'TOMSP', + EmployeeID: 6, + OrderDate: '1996-07-05T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-10T00:00:00Z', + ShipVia: 1, + Freight: 11.61, + ShipName: 'Toms Spezialit\u00e4ten', + ShipAddress: 'Luisenstr. 48', + ShipCity: 'M\u00fcnster', + ShipRegion: null, + ShipPostalCode: '44087', + ShipCountry: 'Germany', + OrderStatus: 'Processing', + Quantity: '3' + }, + { + OrderID: 10250, + CustomerID: 'HANAR', + EmployeeID: 4, + OrderDate: '1996-07-08T00:00:00Z', + RequiredDate: '1996-08-05T00:00:00Z', + ShippedDate: '1996-07-12T00:00:00Z', + ShipVia: 2, + Freight: 65.83, + ShipName: 'Hanari Carnes', + ShipAddress: 'Rua do Pa\u00e7o, 67', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '05454-876', + ShipCountry: 'Brazil', + OrderStatus: 'Order Placed', + Quantity: '5' + }, + { + OrderID: 10251, + CustomerID: 'VICTE', + EmployeeID: 3, + OrderDate: '1996-07-08T00:00:00Z', + RequiredDate: '1996-08-05T00:00:00Z', + ShippedDate: '1996-07-15T00:00:00Z', + ShipVia: 1, + Freight: 41.34, + ShipName: 'Victuailles en stock', + ShipAddress: '2, rue du Commerce', + ShipCity: 'Lyon', + ShipRegion: null, + ShipPostalCode: '69004', + ShipCountry: 'France', + OrderStatus: 'Order Placed', + Quantity: '6' + }, + { + OrderID: 10252, + CustomerID: 'SUPRD', + EmployeeID: 4, + OrderDate: '1996-07-09T00:00:00Z', + RequiredDate: '1996-08-06T00:00:00Z', + ShippedDate: '1996-07-11T00:00:00Z', + ShipVia: 2, + Freight: 51.3, + ShipName: 'Supr\u00eames d\u00e9lices', + ShipAddress: 'Boulevard Tirou, 255', + ShipCity: 'Charleroi', + ShipRegion: null, + ShipPostalCode: 'B-6000', + ShipCountry: 'Belgium', + OrderStatus: 'Processing', + Quantity: '5' + }, + { + OrderID: 10253, + CustomerID: 'HANAR', + EmployeeID: 3, + OrderDate: '1996-07-10T00:00:00Z', + RequiredDate: '1996-07-24T00:00:00Z', + ShippedDate: '1996-07-16T00:00:00Z', + ShipVia: 2, + Freight: 58.17, + ShipName: 'Hanari Carnes', + ShipAddress: 'Rua do Pa\u00e7o, 67', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '05454-876', + ShipCountry: 'Brazil', + OrderStatus: 'Processing', + Quantity: '7' + }, + { + OrderID: 10254, + CustomerID: 'CHOPS', + EmployeeID: 5, + OrderDate: '1996-07-11T00:00:00Z', + RequiredDate: '1996-08-08T00:00:00Z', + ShippedDate: '1996-07-23T00:00:00Z', + ShipVia: 2, + Freight: 22.98, + ShipName: 'Chop-suey Chinese', + ShipAddress: 'Hauptstr. 31', + ShipCity: 'Bern', + ShipRegion: null, + ShipPostalCode: '3012', + ShipCountry: 'Switzerland', + OrderStatus: 'Order Placed', + Quantity: '8' + }, + { + OrderID: 10255, + CustomerID: 'RICSU', + EmployeeID: 9, + OrderDate: '1996-07-12T00:00:00Z', + RequiredDate: '1996-08-09T00:00:00Z', + ShippedDate: '1996-07-15T00:00:00Z', + ShipVia: 3, + Freight: 148.33, + ShipName: 'Richter Supermarkt', + ShipAddress: 'Starenweg 5', + ShipCity: 'Gen\u00e8ve', + ShipRegion: null, + ShipPostalCode: '1204', + ShipCountry: 'Switzerland', + OrderStatus: 'Processing', + Quantity: '8' + }, + { + OrderID: 10256, + CustomerID: 'WELLI', + EmployeeID: 3, + OrderDate: '1996-07-15T00:00:00Z', + RequiredDate: '1996-08-12T00:00:00Z', + ShippedDate: '1996-07-17T00:00:00Z', + ShipVia: 2, + Freight: 13.97, + ShipName: 'Wellington Importadora', + ShipAddress: 'Rua do Mercado, 12', + ShipCity: 'Resende', + ShipRegion: 'SP', + ShipPostalCode: '08737-363', + ShipCountry: 'Brazil', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10257, + CustomerID: 'HILAA', + EmployeeID: 4, + OrderDate: '1996-07-16T00:00:00Z', + RequiredDate: '1996-08-13T00:00:00Z', + ShippedDate: '1996-07-22T00:00:00Z', + ShipVia: 3, + Freight: 81.91, + ShipName: 'HILARION-Abastos', + ShipAddress: 'Carrera 22 con Ave. Carlos Soublette #8-35', + ShipCity: 'San Crist\u00f3bal', + ShipRegion: 'T\u00e1chira', + ShipPostalCode: '5022', + ShipCountry: 'Venezuela', + OrderStatus: 'Processing', + Quantity: '1' + }, + { + OrderID: 10258, + CustomerID: 'ERNSH', + EmployeeID: 1, + OrderDate: '1996-07-17T00:00:00Z', + RequiredDate: '1996-08-14T00:00:00Z', + ShippedDate: '1996-07-23T00:00:00Z', + ShipVia: 1, + Freight: 140.51, + ShipName: 'Ernst Handel', + ShipAddress: 'Kirchgasse 6', + ShipCity: 'Graz', + ShipRegion: null, + ShipPostalCode: '8010', + ShipCountry: 'Austria', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10259, + CustomerID: 'CENTC', + EmployeeID: 4, + OrderDate: '1996-07-18T00:00:00Z', + RequiredDate: '1996-08-15T00:00:00Z', + ShippedDate: '1996-07-25T00:00:00Z', + ShipVia: 3, + Freight: 3.25, + ShipName: 'Centro comercial Moctezuma', + ShipAddress: 'Sierras de Granada 9993', + ShipCity: 'M\u00e9xico D.F.', + ShipRegion: null, + ShipPostalCode: '05022', + ShipCountry: 'Mexico', + OrderStatus: 'Processing', + Quantity: '1' + }, + { + OrderID: 10260, + CustomerID: 'OTTIK', + EmployeeID: 4, + OrderDate: '1996-07-19T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-29T00:00:00Z', + ShipVia: 1, + Freight: 55.09, + ShipName: 'Ottilies K\u00e4seladen', + ShipAddress: 'Mehrheimerstr. 369', + ShipCity: 'K\u00f6ln', + ShipRegion: null, + ShipPostalCode: '50739', + ShipCountry: 'Germany', + OrderStatus: 'Order Placed', + Quantity: '1' + }, + { + OrderID: 10261, + CustomerID: 'QUEDE', + EmployeeID: 4, + OrderDate: '1996-07-19T00:00:00Z', + RequiredDate: '1996-08-16T00:00:00Z', + ShippedDate: '1996-07-30T00:00:00Z', + ShipVia: 2, + Freight: 3.05, + ShipName: 'Que Del\u00edcia', + ShipAddress: 'Rua da Panificadora, 12', + ShipCity: 'Rio de Janeiro', + ShipRegion: 'RJ', + ShipPostalCode: '02389-673', + ShipCountry: 'Brazil', + OrderStatus: 'Processing', + Quantity: '1' + }]; diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.css b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.css new file mode 100644 index 000000000..82a3d156a --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.css @@ -0,0 +1,22 @@ +#container { + visibility: hidden; +} + +#loader { +color: #008cff; +font-family: 'Helvetica Neue','calibiri'; +font-size: 14px; +height: 40px; +left: 45%; +position: absolute; +top: 45%; +width: 30%; +} + +td { +border-color: #e0e0e0; +border-style: solid; +text-align: "Left"; +border-width: 1px 0px 0px 0px; +padding: 0px 15px 0 0; +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.js b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.js new file mode 100644 index 000000000..cd04c8860 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.js @@ -0,0 +1,51 @@ +var grid = new ej.grids.Grid({ + dataSource: data, + rowTemplate: '#rowtemplate', + columns: [ + { field: 'OrderID', headerText: 'Order ID', width: 120 }, + { field: 'Quantity', headerText: 'Quantity', width: 170 }, + { field: 'ShipAddress', headerText: 'ShipAddress', width: 170 }, + { field: 'OrderDate', headerText: 'Order Date', width: 120 }, + { field: 'OrderStatus', headerText: 'Order Status', width: 120 }, + ], + dataBound: () => { + + var gridInstance = document.getElementById('Grid').ej2_instances[0]; + + var chipList = gridInstance.getContentTable().querySelectorAll('.chipList'); + for (var i = 0; i < chipList.length; i++) { + var chipValue = chipList[i].innerText; + new ej.buttons.ChipList({ chips: [chipValue] }, chipList[i]); + } + + var NumericList = gridInstance.getContentTable().querySelectorAll('.numeric'); + for (var i = 0; i < NumericList.length; i++) { + var numberValue = new ej.inputs.NumericTextBox({}); + numberValue.appendTo(NumericList[i]); + } + + var dateList = gridInstance.getContentTable().querySelectorAll('.date-input'); + for (var i = 0; i < dateList.length; i++) { + var dateInput = dateList[i]; + var dateValue = dateInput.value; + var datepicker = new ej.calendars.DatePicker({ + value: new Date(dateValue), + }); + datepicker.appendTo(dateInput); + } + + var dropdownList = gridInstance.getContentTable().querySelectorAll('.dropdownlist-input'); + for (var i = 0; i < dropdownList.length; i++) { + var dropdownInputValue = dropdownList[i]; + var dropData = ['Processing', 'Order Placed', 'Delivered']; + var dropdown = new ej.dropdowns.DropDownList({ + dataSource: dropData, + value: dropdownList[i].value, + popupHeight: 150, + popupWidth: 150 + }); + dropdown.appendTo(dropdownInputValue); + } + }, +}); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.ts b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.ts new file mode 100644 index 000000000..df1f71bdf --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/index.ts @@ -0,0 +1,58 @@ +import { Grid } from '@syncfusion/ej2-grids'; +import { data } from './datasource.ts'; +import { ChipList } from '@syncfusion/ej2-buttons'; +import { NumericTextBox } from '@syncfusion/ej2-inputs'; +import { DatePicker } from '@syncfusion/ej2-calendars'; +import { DropDownList } from '@syncfusion/ej2-dropdowns'; + +let grid: Grid = new Grid({ + dataSource: data, + rowTemplate: '#rowtemplate', + columns: [ + { field: 'OrderID', headerText: 'Order ID', width: 120 }, + { field: 'Quantity', headerText: 'Quantity', width: 170 }, + { field: 'ShipAddress', headerText: 'Ship Address', width: 170 }, + { field: 'OrderDate', headerText: 'Order Date', width: 120 }, + { field: 'OrderStatus', headerText: 'Order Status', width: 120 }, + ], + dataBound: () => { + + let gridInstance = (document.getElementById('Grid') as Grid).ej2_instances[0]; + + let chipList = gridInstance.getContentTable().querySelectorAll('.chipList'); + for (let i = 0; i < chipList.length; i++) { + let chipValue = chipList[i].innerText; + new ChipList({ chips: [chipValue] }, chipList[i]); + } + + let NumericList = gridInstance.getContentTable().querySelectorAll('.numeric'); + for (let i = 0; i < NumericList.length; i++) { + let numeric: NumericTextBox = new NumericTextBox({}); + numeric.appendTo(NumericList[i]); + } + + let dateList = gridInstance.getContentTable().querySelectorAll('.date-input'); + for (let i = 0; i < dateList.length; i++) { + let dateInput = dateList[i]; + let dateValue = dateInput.value; + let datepickerObject: DatePicker = new DatePicker({ + value: new Date(dateValue), + }); + datepickerObject.appendTo(dateInput); + } + + let dropdownList = gridInstance.getContentTable().querySelectorAll('.dropdownlist-input'); + for (let i = 0; i < dropdownList.length; i++) { + let dropdownInputValue = dropdownList[i]; + let dropData = ['Processing', 'Order Placed', 'Delivered']; + let dropdown:DropDownList = new DropDownList({ + dataSource: dropData, + value: dropdownList[i].value, + popupHeight: 150, + popupWidth: 150 + }); + dropdown.appendTo(dropdownInputValue); + } + }, +}); +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/js/index.html b/ej2-javascript/code-snippet/grid/row-template-component-cs1/js/index.html new file mode 100644 index 000000000..5b2f8d9ec --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/js/index.html @@ -0,0 +1,44 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/systemjs.config.js b/ej2-javascript/code-snippet/grid/row-template-component-cs1/systemjs.config.js new file mode 100644 index 000000000..4e0312c9b --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/systemjs.config.js @@ -0,0 +1,43 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/23.2.4/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + 'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js', + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js", + "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js", + "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js", + "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js", + "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js", + "@syncfusion/ej2-dropdowns":"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js" + }, + meta: { + '*.json': { loader: 'plugin-json' } + } +}); +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-component-cs1/ts/index.html b/ej2-javascript/code-snippet/grid/row-template-component-cs1/ts/index.html new file mode 100644 index 000000000..9441b6b10 --- /dev/null +++ b/ej2-javascript/code-snippet/grid/row-template-component-cs1/ts/index.html @@ -0,0 +1,38 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + +
    Loading....
    +
    +
    +
    + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/Medium-36px-spin.gif b/ej2-javascript/code-snippet/grid/row-template-cs30/Medium-36px-spin.gif deleted file mode 100644 index fe8c4331b..000000000 Binary files a/ej2-javascript/code-snippet/grid/row-template-cs30/Medium-36px-spin.gif and /dev/null differ diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/datasource.ts b/ej2-javascript/code-snippet/grid/row-template-cs30/datasource.ts index c7b6b3d0c..34b16355a 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/datasource.ts +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/datasource.ts @@ -1,80 +1,3 @@ -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 - }]; - export let employeeData: Object[] = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/es5-datasource.js b/ej2-javascript/code-snippet/grid/row-template-cs30/es5-datasource.js index 7fc7297c3..48931ebb2 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/es5-datasource.js +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/es5-datasource.js @@ -1,80 +1,3 @@ -var data = [ - { - 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 - }]; - var employeeData = [{ 'EmployeeID': 1, 'LastName': 'Davolio', diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/index.js b/ej2-javascript/code-snippet/grid/row-template-cs30/index.js index 2155126f0..c640e4abc 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/index.js +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/index.js @@ -7,5 +7,4 @@ var grid = new ej.grids.Grid({ ], height: 315 }); -grid.appendTo('#Grid'); - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/index.ts b/ej2-javascript/code-snippet/grid/row-template-cs30/index.ts index a1ad8241e..b33aada0c 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/index.ts +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/index.ts @@ -1,5 +1,3 @@ - - import { Grid } from '@syncfusion/ej2-grids'; import { employeeData } from './datasource.ts'; @@ -12,7 +10,4 @@ let grid: Grid = new Grid({ ], height: 315 }); -grid.appendTo('#Grid'); - - - +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/grid/row-template-cs30/js/index.html b/ej2-javascript/code-snippet/grid/row-template-cs30/js/index.html index ac84b4882..b62c9071d 100644 --- a/ej2-javascript/code-snippet/grid/row-template-cs30/js/index.html +++ b/ej2-javascript/code-snippet/grid/row-template-cs30/js/index.html @@ -1,28 +1,22 @@ - + + EJ2 Grid - - - - - - - - - - - - - - - - - - + + + + + + + + + + + @@ -53,12 +47,6 @@
    ${Title}
    Country - ${Country} -
    ${Title}
    Country - ${Country} -
    Hire Date + Birth Date ${formatDate(data.HireDate)} + ${formatDate(data.BirthDate)}
    Country + Hire Date ${Country} + ${formatDate(data.HireDate)}
    Hire Date + Birth Date ${formatDate(data.HireDate)} + ${formatDate(data.BirthDate)}
    Country + Hire Date ${Country} + ${formatDate(data.HireDate)}