-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgrid-grouping-sample.html
More file actions
34 lines (32 loc) · 1.42 KB
/
Copy pathgrid-grouping-sample.html
File metadata and controls
34 lines (32 loc) · 1.42 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
<!DOCTYPE html><html lang="en"><head>
<title>EJ2 Grid</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Typescript Grid Control">
<meta name="author" content="Syncfusion">
<script src="https://ej2.syncfusion.com/javascript/demos/grid/default/datasource.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css">
<link href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="ej2.min.js"></script>
<script src="data.js" type="text/javascript"></script>
</head>
<body>
<div id="Grid"></div>
<script >
var grid = new ej.grids.Grid({
dataSource: data.slice(0, 20),
height: 400,
allowGrouping: true,
allowSorting: true,
columns: [
{ field: 'OrderID', isPrimaryKey: true, headerText: 'Order ID',width: 120},
{ field: 'CustomerID', headerText: 'CustomerID',width: 120 },
{ field: 'EmployeeID', headerText: 'Employee ID',width: 120 },
{ field: "ShipCity", headerText: "Ship City", width: 250 },
],
});
grid.appendTo('#Grid');
</script>
</body></html>