ej.base.enableRipple(true);
// S E A R C H B A R
// initialize AutoComplete component
var atcObj1 = new ej.dropdowns.AutoComplete({
// bind the DataManager instance to dataSource property
dataSource: new ej.data.DataManager({ url: 'https://icdsearchjsonservice.azurewebsites.net/api/ICD10CM', adaptor: new ej.data.WebApiAdaptor(), crossDomain: true }),
// set the count for displays the suggestion items.
suggestionCount: 50,
// bind the Query instance to query property
query: new ej.data.Query().from('getsearchautocomplete1').select(['full_title', 'code']).take(10).requiresCount(),
// map the appropriate columns to fields property
fields: { value: "full_title" },
itemTemplate: "<span>${full_title} - <b>${code}</b></span>",
// set the placeholder to AutoComplete input element
placeholder: 'Search for an ICD 10 CM Code or free text...',
// sort the resulted items
sortOrder: 'Ascending',
// enable the autofill property to fill a first matched value in input when press a down key
autofill: false,
// set the filterType to searching operation
filterType: 'Contains',
// text highlight
highlight: true,
floatLabelType: "Auto",
autoFocus: true,
select: function(argument) {
console.log("New value selected is " + argument.itemData.value);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//Use parse() method to convert JSON string to JSON object
var responseJsonObj = JSON.parse(this.responseText);
// Render the TreeView with hierarchical data source
var treeObj = new ej.navigations.TreeView({
fields: { dataSource: responseJsonObj.result, id: 'code', text: 'title', child: 'children' }
});
treeObj.appendTo('#tree');
console.log("Data Received is ");
console.log(responseJsonObj);
}
};
xmlhttp.open("GET", "https://icdsearchjsonservice.azurewebsites.net/api/ICD10CM/getindextitleset1?", true);
xmlhttp.send();
}
});
atcObj1.appendTo('#search-bar');
// initialize AutoComplete component
// S E A R C H B A R
// T R E E V I E W
// var data = new ej.data.DataManager({
// url: 'https://icdsearchjsonservice.azurewebsites.net/api/ICD10CM/getindextitleset1?',
// adaptor: new ej.data.ODataV4Adaptor(),
// crossDomain: true,
// });
// // Render the TreeView with hierarchical data source
// var treeObj = new ej.navigations.TreeView({
// fields: { dataSource: data.result, id: 'code', text: 'title', child: 'children' }
// });
// treeObj.appendTo('#tree');
// // T R E E V I E W
// G R I D 1
ej.base.enableRipple(true);
var hostUrl = '';
var data = new ej.data.DataManager({
url: 'https://icdsearchjsonservice.azurewebsites.net/api/ICD10CM/getbillablecodes1?',
adaptor: new ej.data.WebApiAdaptor(),
offline: true,
crossDomain: true
});
var grid = new ej.grids.Grid({
dataSource: data.result,
allowFiltering: true,
allowPaging: true,
enableResponsiveRow: true,
columns: [
{ field: 'billable', headerText: 'Order ID', width: 10, textAlign: 'Center' },
{ field: 'code', headerText: 'Customer ID', width: 20, textAlign: 'Center' },
{ field: 'title', headerText: 'Employee ID', width: 20, textAlign: 'Center' },
],
pageSettings: { pageCount: 5 }
});
grid.appendTo('#Grid1');
// G R I D 1
// G R I D 2
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
enableResponsiveRow: true,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 10, textAlign: 'Center' },
{ field: 'CustomerID', headerText: 'Customer ID', width: 20, textAlign: 'Center' },
{ field: 'EmployeeID', headerText: 'Employee ID', width: 20, textAlign: 'Center' },
{ field: 'Freight', headerText: 'Freight', width: 20, textAlign: 'Center' },
{ field: 'ShipCountry', headerText: 'Ship Country', width: 10, textAlign: 'Center' },
],
pageSettings: { pageCount: 3 }
});
grid.appendTo('#Grid2');
// G R I D 2
// G R I D 3
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
enableResponsiveRow: true,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 10, textAlign: 'Center' },
{ field: 'CustomerID', headerText: 'Customer ID', width: 20, textAlign: 'Center' },
{ field: 'EmployeeID', headerText: 'Employee ID', width: 20, textAlign: 'Center' },
{ field: 'Freight', headerText: 'Freight', width: 20, textAlign: 'Center' },
{ field: 'ShipCountry', headerText: 'Ship Country', width: 10, textAlign: 'Center' },
],
pageSettings: { pageCount: 3 }
});
grid.appendTo('#Grid3');
// G R I D 3
// G R I D 4
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
enableResponsiveRow: true,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 10, textAlign: 'Center' },
{ field: 'CustomerID', headerText: 'Customer ID', width: 20, textAlign: 'Center' },
{ field: 'EmployeeID', headerText: 'Employee ID', width: 20, textAlign: 'Center' },
{ field: 'Freight', headerText: 'Freight', width: 20, textAlign: 'Center' },
{ field: 'ShipCountry', headerText: 'Ship Country', width: 10, textAlign: 'Center' },
],
pageSettings: { pageCount: 3 }
});
grid.appendTo('#Grid4');
// G R I D 4
// G R I D 5
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
enableResponsiveRow: true,
columns: [
{ field: 'OrderID', headerText: 'Order ID', width: 10, textAlign: 'Center' },
{ field: 'CustomerID', headerText: 'Customer ID', width: 20, textAlign: 'Center' },
{ field: 'EmployeeID', headerText: 'Employee ID', width: 20, textAlign: 'Center' },
{ field: 'Freight', headerText: 'Freight', width: 20, textAlign: 'Center' },
{ field: 'ShipCountry', headerText: 'Ship Country', width: 10, textAlign: 'Center' },
],
pageSettings: { pageCount: 3 }
});
grid.appendTo('#Grid5');
// G R I D 5