Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 剑道网格数据';使用弹出式编辑器添加时不显示?_Javascript_Kendo Ui_Telerik_Kendo Grid - Fatal编程技术网

Javascript 剑道网格数据';使用弹出式编辑器添加时不显示?

Javascript 剑道网格数据';使用弹出式编辑器添加时不显示?,javascript,kendo-ui,telerik,kendo-grid,Javascript,Kendo Ui,Telerik,Kendo Grid,我正在尝试使用剑道弹出窗口添加数据。它正在添加到数据源中(请参见网格右下方),但它没有显示在网格行中的值中。请帮助我实现这一目标。 源代码:此代码将由剑道编辑器- html{字体大小:14px;字体系列:Arial、Helvetica、sans serif;} $(文档).ready(函数(){ $(“#网格”).kendoGrid({ “数据源”:{ “批处理”:“真”, “模式”:{ “模型”:{ “id”:“id”, “字段”:{ “id”:{ “可编辑”:“假”, “可为null”:“

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


html{字体大小:14px;字体系列:Arial、Helvetica、sans serif;}
$(文档).ready(函数(){
$(“#网格”).kendoGrid({
“数据源”:{
“批处理”:“真”,
“模式”:{
“模型”:{
“id”:“id”,
“字段”:{
“id”:{
“可编辑”:“假”,
“可为null”:“FALSE”
},
“电话”:{
“可编辑”:false,
“类型”:“字符串”
}
}
}
},
“表”:空,
“字段”:[
{
“编码”:正确,
“字段”:“cusAddTelephone”,
“标题”:“电话”
},
{
“编码”:正确,
“名称”:“名称”,
“命令”:[
“摧毁”,
“编辑”
]
}
],
“pageSize”:“TRUE”,
“数据”:[
{
“电话”:“乔·史密斯”
},
{
“电话”:“简·史密斯”
},
{
“电话”:“威尔·罗伯茨”
}
]
},
“栏目”:[
{
“字段”:“cusAddTelephone”,
“标题”:“电话”
},
{
“名称”:“名称”,
“命令”:[
“摧毁”,
“编辑”
]
}
],
“可排序”:“TRUE”,
“可编辑”:“弹出窗口”,
“工具栏”:[
{
“名称”:“创建”,
“文本”:“添加新联系人”
}
],
“可分组”:“真实”,
“可分页”:{
“pageSize”:“TRUE”,
“按钮计数”:“5”,
“架构”:“TRUE”
}
});
});
.客户照片{
显示:内联块;
宽度:32px;
高度:32px;
边界半径:50%;
背景尺寸:32px 35px;
背景位置:中心;
垂直对齐:中间对齐;
线高:32px;
盒影:插入0 1px#999,插入0 0 10px rgba(0,0,0,2);
左边距:5px;
}
.客户名称{
显示:内联块;
垂直对齐:中间对齐;
线高:32px;
左:3倍;
}

我假设这就是您所期望的

我已经为您创建了附加的dojo,并让您的代码正常工作


希望你能注意到,我所要做的就是删除剑道设置中标识部分的引号

我想这就是你所期待的

我已经为您创建了附加的dojo,并让您的代码正常工作

希望你能注意到,我所要做的就是删除剑道设置中标识部分的引号

 <!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>