This repository was archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathgridodatabinding.html
More file actions
87 lines (83 loc) · 3.91 KB
/
Copy pathgridodatabinding.html
File metadata and controls
87 lines (83 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Essential JS 1 : Remote Binding</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<link href="../content/bootstrap.min.css" rel="stylesheet" />
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
<link href="../content/default.css" rel="stylesheet" />
<link href="../content/default-responsive.css" rel="stylesheet" />
<link href="../content/ejthemes/responsive-css/ej.responsive.css" rel="stylesheet" />
<!--[if lt IE 9]>
<script src="../scripts/jquery-1.11.3.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="../scripts/jquery-3.4.1.min.js"></script>
<!--<![endif]-->
<script src="../scripts/jsrender.min.js"></script>
<script src="../scripts/ej.web.all.min.js"></script>
<script src="../scripts/properties.js" type="text/javascript"></script>
</head>
<body>
<div class="content-container-fluid">
<div class="row">
<div class="cols-sample-area">
<div id="Grid"></div>
</div>
<div class="cols-prop-area event-tracer">
<div>
<div class="heading">
<span>RESTful APIs</span>
</div>
<div class="prop-grid content">
<div class="eventarea" style="margin:5px 0px;">
<span class="eventTitle" style="overflow-wrap: break-word; font-weight: bold; padding:20px 0px;"></span>
</div>
<div class="eventarea">
<div class="EventLog" id="EventLog" style="word-break: break-all;">
</div>
</div>
<div class="evtbtn">
<input type="button" class="eventclear e-btn" value="Clear" onclick="onClear()" />
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
var dataManger = ej.DataManager({
url: window.baseurl + "Wcf/Northwind.svc/Orders", crossDomain: true
});
var queryOrder = ej.Query().where(ej.Predicate("OrderID", ej.FilterOperators.lessThan, 10448, true).and("ShipCountry", "notequal", "null", true));
$("#Grid").ejGrid({
dataSource: dataManger,
allowPaging: true,
allowSorting: true,
allowFiltering: true,
query: queryOrder,
filterSettings: { filterType: "menu" },
allowGrouping: true,
groupSettings: { groupedColumns: ["ShipCountry"], enableDropAreaAnimation: false, },
pageSettings: { pageSize: 10 },
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right },
{ field: "OrderDate", headerText: "Order Date", type: "date", format: "{0:dd/MM/yyyy}", type: "date", width: 90 },
{ field: "ShipName", headerText: "Ship Name", textAlign: ej.TextAlign.Right, width: 90 },
{ field: "ShipCity", headerText: "Ship City", width: 100 },
{ field: "ShipCountry", headerText: 'Ship Country', width: 100 }
]
});
$(".eventTitle:first").text("http:" + window.baseurl + "Wcf/Northwind.svc/Orders/?");
});
$(document).ajaxSend(function (event, jqxhr, settings) {
jQuery.addEventLog("<span class='eventTitle' id='url'> " + settings.url.split("?")[1] + " </span>");
});
function onClear() {
$("#EventLog").html("");
}
</script>
</body>
</html>