mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
119 lines
3.6 KiB
HTML
Executable File
119 lines
3.6 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Events</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 id="grid"></div>
|
|
|
|
<script>
|
|
function onChange(arg) {
|
|
var selected = $.map(this.select(), function(item) {
|
|
return $(item).text();
|
|
});
|
|
|
|
kendoConsole.log("Selected: " + selected.length + " item(s), [" + selected.join(", ") + "]");
|
|
}
|
|
|
|
function onDataBound(arg) {
|
|
kendoConsole.log("Grid data bound");
|
|
}
|
|
|
|
function onDataBinding(arg) {
|
|
kendoConsole.log("Grid data binding");
|
|
}
|
|
|
|
function onSorting(arg) {
|
|
kendoConsole.log("Sorting on field: " + arg.sort.field + ", direction:" + (arg.sort.dir || "none"));
|
|
}
|
|
|
|
function onFiltering(arg) {
|
|
kendoConsole.log("Filter on " + kendo.stringify(arg.filter));
|
|
}
|
|
|
|
function onPaging(arg) {
|
|
kendoConsole.log("Paging to page index:" + arg.page);
|
|
}
|
|
|
|
function onGrouping(arg) {
|
|
kendoConsole.log("Group on " + kendo.stringify(arg.groups));
|
|
}
|
|
|
|
function onGroupExpand(arg) {
|
|
kendoConsole.log("The group to be expanded: " + kendo.stringify(arg.group));
|
|
}
|
|
|
|
function onGroupCollapse(arg) {
|
|
kendoConsole.log("The group to be collapsed: " + kendo.stringify(arg.group));
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
$("#grid").kendoGrid({
|
|
dataSource: {
|
|
transport: {
|
|
read: {
|
|
url: "https://demos.telerik.com/kendo-ui/service/Products",
|
|
dataType: "jsonp"
|
|
}
|
|
},
|
|
pageSize: 20
|
|
},
|
|
height: 350,
|
|
change: onChange,
|
|
dataBound: onDataBound,
|
|
dataBinding: onDataBinding,
|
|
selectable: "multiple cell",
|
|
pageable: true,
|
|
sortable: true,
|
|
filterable: true,
|
|
groupable: true,
|
|
sort: onSorting,
|
|
filter: onFiltering,
|
|
group: onGrouping,
|
|
page: onPaging,
|
|
groupExpand: onGroupExpand,
|
|
groupCollapse: onGroupCollapse,
|
|
columns: [
|
|
{
|
|
field: "ProductName",
|
|
title: "Product Name"
|
|
},
|
|
{
|
|
field: "UnitPrice",
|
|
title: "Unit Price",
|
|
format: "{0:c}"
|
|
},
|
|
{
|
|
field: "UnitsInStock",
|
|
title: "Units In Stock"
|
|
}
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|