【问题标题】:Kendo Grid Data's not displaying while adding using popup editor?使用弹出编辑器添加时不显示剑道网格​​数据?
【发布时间】:2015-08-10 16:38:47
【问题描述】:

我正在尝试使用 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>

【问题讨论】:

    标签: javascript kendo-ui telerik kendo-grid


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-06
      • 2012-11-10
      • 2013-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多