forked from shibing624/python-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsgrid_start.html
More file actions
63 lines (56 loc) · 1.96 KB
/
jsgrid_start.html
File metadata and controls
63 lines (56 loc) · 1.96 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jsGrid - Basic Scenario</title>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css"/>
<link type="text/css" rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
</head>
<body>
<h1>Basic Scenario</h1>
<div id="jsGrid"></div>
<script>
$(function () {
var clients = [
{
"Name": "Otto Clay",
"Age": 25,
"Country": 1,
"Address": "Ap #897-1459 Quam Avenue",
"Married": false,
"image": "1.png"
}
];
var countries = [
{Name: "", Id: 0},
{Name: "United States", Id: 1},
{Name: "Canada", Id: 2},
{Name: "United Kingdom", Id: 3}
];
$("#jsGrid").jsGrid({
width: "100%",
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 5,
deleteConfirm: "Do you really want to delete the data?",
data: clients,
fields: [
{name: "Name", type: "text", width: 150, validate: "required"},
{name: "Age", type: "number", width: 50},
{name: "Address", type: "text", width: 200},
{name: "Country", type: "select", items: countries, valueField: "Id", textField: "Name"},
{name: "Married", type: "checkbox", title: "Is Married", sorting: false},
{type: "control"}
]
});
});
</script>
</body>
</html>