<script type="text/javascript">
$(function () {
var ElecInformation = ej.DataManager({ url: "OSWData", adaptor: new ej.UrlAdaptor() });
var ElecDetail = ej.DataManager({ url: "OSWDetail", adaptor: new ej.UrlAdaptor() });
var detailQuery = new ej.Query();
var detailPromise = ElecDetail.excuteQuery(detailQuery);
var query = new ej.Query();
var promise = ElecInformation.executeQuery(query)
.done(function (e) {
$("#grid").ejGrid({
dataSource: e.result,
allowSorting: true,
allowPaging: true,
columns: [
{ field: "WorkOrder", headerText: 'Work order', width: 75 },
{ field: "Tera", headerText: 'ZZ84 Tera', textAlign: ej.TextAlign.Left, width: 100 },
{ field: "Terc", headerText: 'ZZ84 Terc', textAlign: ej.TextAlign.Left, width: 120 },
{ field: "TotalHrs", headerText: 'Total hours', textAlign: ej.TextAlign.Left, width: 100 },
{ field: "HrsRemaining", headerText: 'Hours remainaing', textAlign: ej.TextAlign.Left, width: 100 }
],
childGrid: {
dataSource: ElecDetail,
queryString: "Order",
allowPaging: true,
columns: [
{ field: "Operation", headerText: 'Operation', width: 75 },
{ field: "Order", headerText: 'Ordre', width: 75 },
{ field: "Item", headerText: 'Article', width: 75 },
]
}
})
})
$("#Grid").ejGrid({
dataSource: data,
allowSorting: true,
columns: [
{ field: "EmployeeID", headerText: 'Employee ID', textAlign: ej.TextAlign.Right, width: 75 },
{ field: "FirstName", headerText: 'First Name', textAlign: ej.TextAlign.Left, width: 100 },
{ field: "Title", headerText: 'Title', textAlign: ej.TextAlign.Left, width: 120 },
{ field: "City", headerText: 'City', textAlign: ej.TextAlign.Left, width: 100 },
{ field: "Country", headerText: 'Country', textAlign: ej.TextAlign.Left, width: 100 }
],
childGrid: {
dataSource: dataManger,
queryString: "EmployeeID",
allowPaging: true,
columns: [
{ field: "OrderID", headerText: 'Order ID', textAlign: ej.TextAlign.Right, width: 75 },
{ field: "ShipCity", headerText: 'Ship City', textAlign: ej.TextAlign.Left, width: 100 },
{ field: "Freight", headerText: 'Freight', textAlign: ej.TextAlign.Left, width: 120 },
{ field: "ShipName", headerText: 'Ship Name', textAlign: ej.TextAlign.Left, width: 100 }
], |