我正在尝试使用 Kendo TreeView,但我绝对没有运气绑定到本地数据源。我有一个简单的 asp.net Web 表单页面,我从在线演示中复制并粘贴了代码,但我所做的一切都无法使其正常工作。有任何想法吗?
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Kendo TreeView Demo</title>
<link href="styles/kendo/kendo.common.min.css" rel="stylesheet" />
<link href="styles/kendo/kendo.default.min.css" rel="stylesheet" />
<style type="text/css">
* { font-family: "Segoe UI", Arial, Helvetica, Sans-Serif; font-size: 12px; }
</style>
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/kendo/kendo.all.min.js"></script>
<script type="text/javascript" src="scripts/kendo/kendo.data.min.js"></script>
<script type="text/javascript">
$(document).ready(function ()
{
var inlineDefault = new kendo.data.HierarchicalDataSource(
{
data:
[
{
text: "Furniture",
items:
[
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{ text: "Occasional Furniture" }
]
},
{
text: "Decor",
items:
[
{ text: "Bed Linen" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
]
}
]
});
$("#treeview-left").kendoTreeView(
{
dataSource: inlineDefault
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="treeview-left"></div>
</div>
</form>
</body>
</html>