我似乎无法在下面的剑道网格中获取本地数据(var people)。如果没有 people 数组和 dataSource 属性,列数据可以很好地呈现。所以不确定错误在哪里。
<!doctype html>
<head>
<link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
<link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/kendo.web.min.js" type="text/javascript"></script>
</head>
<body>
<div id="grid">
</div>
<script>
$(function(){
$("#grid").kendoGrid({
var people = [{patientName: "John Doe", MRN: "464684778", account: "56765765224768", dateOfBirth: "01/06/2013", room: 403, bed: 22, admitDate: "01/15/2013" }];
columns: [{title: "Patient Name"},
{title: "MRN"},
{title: "Account#"},
{title: "Date of Birth"},
{title: "Room"},
{title: "Bed"},
{title: "Admit Date"}],
dataSource: {
data:people
}
});
});
</script>
</body>
</html>