Files
2022-11-04 13:24:24 +02:00

122 lines
4.2 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title>Sticky columns</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>
$(document).ready(function () {
if (kendo.support.browser.msie !== true) {
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
},
schema: {
model: {
fields: {
OrderID: { type: "number" },
ShipCountry: { type: "string" },
ShipName: { type: "string" },
ShipCity: { type: "string" },
ShipAddress: { type: "string" },
RequiredDate: { type: "date" }
}
}
},
pageSize: 30
},
height: 540,
sortable: true,
reorderable: true,
groupable: true,
resizable: true,
filterable: true,
columnMenu: true,
pageable: true,
columns: [{
field: "OrderID",
title: "Order ID",
stickable: true,
width: 150
},
{
field: "CustomerID",
title: "Customer ID",
stickable: true,
width: 250
},
{
field: "ShipName",
title: "Ship Name",
stickable: true,
width: 350
}, {
field: "ShipCountry",
title: "Ship Country",
stickable: true,
width: 300
}, {
field: "ShipAddress",
title: "Ship Address",
sticky: true,
width: 300
}, {
field: "ShipCity",
title: "Ship City",
stickable: true,
width: 300
}, {
field: "ShipPostalCode",
title: "Ship Postal Code",
stickable: true,
width: 300
},
{
field: "ShipVia",
title: "Ship Via",
stickable: true,
width: 250
},
{
field: "RequiredDate",
title: "Required Date",
template: '#= kendo.toString(RequiredDate, "dd/MM/yyyy") #',
stickable: true,
width: 250
}
]
});
} else {
$("#grid").html("Sticky columns are not supported in IE!")
}
});
</script>
</div>
</body>
</html>