gpt4 book ai didi

javascript - 使用弹出编辑器添加时 Kendo 网格数据未显示?

转载 作者:行者123 更新时间:2023-11-28 07:03:06 25 4
gpt4 key购买 nike

我正在尝试使用剑道弹出窗口添加数据。它正在添加到数据源(请参见网格右下角),但它没有显示在网格行的值中。请帮助我实现这一目标。源代码:此代码将kendo编辑器-http://dojo.telerik.com/

 <!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/grid/index">
<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.2.805/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.2.805/styles/kendo.material.min.css" />

<script src="//kendo.cdn.telerik.com/2015.2.805/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2015.2.805/js/kendo.all.min.js"></script>
</head>
<body>

<div id="example">
<div id="grid"></div>

<script>
$(document).ready(function () {
$("#grid").kendoGrid({
"dataSource": {
"batch": "TRUE",
"schema": {
"model": {
"id": "id",
"field": {
"id": {
"editable": "FALSE",
"nullable": "FALSE"
},
"cusAddTelephone": {
"editable": false,
"type": "string"
}
}
}
},
"table": null,
"fields": [
{
"encoded": true,
"field": "cusAddTelephone",
"title": "Telephone"
},
{
"encoded": true,
"title": "&nbsp;",
"command": [
"destroy",
"edit"
]
}
],
"pageSize": "TRUE",
"data": [
{
"cusAddTelephone": "Joe Smith"
},
{
"cusAddTelephone": "Jane Smith"
},
{
"cusAddTelephone": "Will Roberts"
}
]
},
"columns": [
{
"field": "cusAddTelephone",
"title": "Telephone"
},
{
"title": "&nbsp;",
"command": [
"destroy",
"edit"
]
}
],
"sortable": "TRUE",
"editable": "popup",
"toolbar": [
{
"name": "create",
"text": "add a new contact"
}
],
"groupable": "TRUE",
"pageable": {
"pageSize": "TRUE",
"buttonCount": "5",
"schema": "TRUE"
}
});
});
</script>
</div>

<style type="text/css">
.customer-photo {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 50%;
background-size: 32px 35px;
background-position: center center;
vertical-align: middle;
line-height: 32px;
box-shadow: inset 0 0 1px #999, inset 0 0 10px rgba(0,0,0,.2);
margin-left: 5px;
}

.customer-name {
display: inline-block;
vertical-align: middle;
line-height: 32px;
padding-left: 3px;
}
</style>


</body>
</html>

最佳答案

我假设这就是您所期待的? Your code dojo

我已经为您创建了附加的道场并让您提供的代码正常工作。

您可能会注意到,我所要做的就是删除剑道设置的标识部分周围的引号。

关于javascript - 使用弹出编辑器添加时 Kendo 网格数据未显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31924830/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com