mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
97 lines
2.9 KiB
HTML
Executable File
97 lines
2.9 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Persist state</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example">
|
|
<div class="box">
|
|
<a href="#" class="k-button" id="save">Save State</a>
|
|
<a href="#" class="k-button" id="load">Load State</a>
|
|
</div>
|
|
<div id="grid"></div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
$("#grid").kendoGrid({
|
|
dataSource: {
|
|
type: "odata",
|
|
transport: {
|
|
read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
|
|
},
|
|
pageSize: 20
|
|
},
|
|
height: 550,
|
|
groupable: true,
|
|
sortable: true,
|
|
reorderable: true,
|
|
resizable: true,
|
|
columnMenu: true,
|
|
filterable: {
|
|
mode: "row"
|
|
},
|
|
pageable: {
|
|
refresh: true,
|
|
pageSizes: true,
|
|
buttonCount: 5
|
|
},
|
|
columns: [{
|
|
field: "ContactName",
|
|
title: "Contact Name",
|
|
width: 250,
|
|
locked: true
|
|
}, {
|
|
field: "ContactTitle",
|
|
title: "Contact Title",
|
|
width: 350
|
|
}, {
|
|
field: "CompanyName",
|
|
title: "Company Name",
|
|
width: 350
|
|
}, {
|
|
field: "Country",
|
|
width: 450
|
|
}]
|
|
});
|
|
|
|
var grid = $("#grid").data("kendoGrid");
|
|
|
|
$("#save").click(function (e) {
|
|
e.preventDefault();
|
|
localStorage["kendo-grid-options"] = kendo.stringify(grid.getOptions());
|
|
});
|
|
|
|
$("#load").click(function (e) {
|
|
e.preventDefault();
|
|
var options = localStorage["kendo-grid-options"];
|
|
if (options) {
|
|
grid.setOptions(JSON.parse(options));
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|