Files
jube-fork/Jube.App/wwwroot/kendo/examples/grid/checkbox-selection.html
2022-11-04 13:24:24 +02:00

69 lines
2.2 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title>Checkbox selection</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) {
kendoConsole.log("The selected product ids are: [" + this.selectedKeyNames().join(", ") + "]");
}
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: {
pageSize: 10,
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/Products",
dataType: "jsonp"
}
},
schema: {
model: {
id: "ProductID"
}
}
},
pageable: true,
scrollable: false,
persistSelection: true,
sortable: true,
change: onChange,
columns: [
{ selectable: true, width: "50px" },
{ field:"ProductName", title: "Product Name" },
{ field: "UnitPrice", title:"Unit Price", format: "{0:c}"},
{ field: "UnitsInStock", title:"Units In Stock"},
{ field: "Discontinued"}]
});
});
</script>
</div>
</body>
</html>