Skip to content

DOCINFRA-2341_merged_using_automation #161

New issue

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

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

Already on GitHub? Sign in to your account

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ej2-javascript-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,8 @@
<li><a href="/ej2-javascript/spreadsheet/how-to/change-active-sheet">Changing the active sheet while importing a file</a></li>
<li><a href="/ej2-javascript/spreadsheet/how-to/import-an-excel-document-using-file-uploader">Import an excel document using file uploader</a></li>
<li><a href="/ej2-javascript/spreadsheet/how-to/identify-the-context-menu-opened">Identify the context menu opened</a></li>
<li><a href="/ej2-javascript/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string">Save and open Spreadsheet data as Base64 string</a></li>
<li><a href="/ej2-javascript/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet">Insert a sheet programmatically and make it the active sheet</a></li>
</ul>
</li>
<li><a href="/ej2-javascript/spreadsheet/mobile-responsiveness">Mobile Responsiveness</a></li>
Expand Down
29 changes: 5 additions & 24 deletions ej2-javascript/code-snippet/data/getting-started-cs1/index.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
var template = '<tr><td>${OrderID}</td><td>${CustomerID}</td><td>${EmployeeID}</td></tr>';

var template = '<tr><td>${OrderID}</td><td>${CustomerID}</td><td>${EmployeeID}</td></tr>'
var group = '<tr><td colspan=3>' +
'<table id="datatable" class="e-table"><tr><th>ID</th><th>Price</th><th>Quantity</th></tr>' +
'${for(detail of Order_Details)}<tr><td>${detail.ProductID}</td><td>${detail.UnitPrice}</td><td>${detail.Quantity}</td></tr>${/for}' +
'<table></td></tr>';
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]);
});
});
result.forEach((data) => {
table.appendChild(compiledFunction(data)[0]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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";
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<script src="systemjs.config.js"></script>
</head>
<body>
<div id='loader'>Loading....</div>
<div id='container'>
<div id='Grid'></div>
<table id='datatable' class='e-table'>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var template = '<tr><td>${OrderID}</td><td>${CustomerID}</td><td>${EmployeeID}</

var compiledFunction = ej.base.compile(template);

const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/';
const SERVICE_URI = 'https://services.odata.org/V4/Northwind/Northwind.svc/';

var table = (document.getElementById('datatable'));

Expand Down
Original file line number Diff line number Diff line change
@@ -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 = '<tr><td>${OrderID}</td><td>${CustomerID}</td><td>${EmployeeID}</td></tr>';

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 = (<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) => {
(<Object[]>e.result).forEach((data: Object) => {
table.appendChild(compiledFunction(data)[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


<script src="https://cdn.syncfusion.com/ej2/20.4.38/dist/ej2.min.js" type="text/javascript"></script>
<script src="es5-datasource.js" type="text/javascript"></script>
</head>
<body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<script src="systemjs.config.js"></script>
</head>
<body>
<div id='loader'>Loading....</div>
<div id='container'>
<div id='Grid'></div>
<table id='datatable' class='e-table'>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 = '<tr><td>${OrderID}</td><td>${CustomerID}</td><td>${EmployeeID}</td></tr>';

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 = (<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) => {
(<Object[]>e.result).forEach((data: Object) => {
Expand Down
Loading