【问题标题】:using $.ajax in kendoui datasource of Grid在 Grid 的 kendoui 数据源中使用 $.ajax
【发布时间】:2015-04-01 12:33:23
【问题描述】:

我正在尝试在我的 kendoui Grid 中使用 jquery ajax 调用来更新数据源。 代码示例(来自文档):

update: function(options) {
      // make JSONP request to http://demos.telerik.com/kendo-ui/service/products/update
      jQuery.ajax({
        url: AjaxSave,
        dataType: "json", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
        success: function(result) {
          options.success(result);
        },
        error: function(result) {
          options.error(result);
        }
      });
    }

但点击更新后出现以下错误:

Error: Only json dataType can be used for update operation.     

...o](n,e[o]):n[o]=e[o]}else{if("json"!==l)throw Error("Only json
dataType can be u...

我做错了什么?

【问题讨论】:

    标签: jquery ajax kendo-ui grid


    【解决方案1】:

    从语法上看,它看起来是正确的。我知道在安装的 jQuery 版本和使用的 Kendo 版本不兼容时会发生这种情况。

    您可能需要交叉检查您的 jQuery/Kendo 版本兼容性,并在必要时更新/回滚。

    【讨论】:

    • 我从最新的试用版 kendoui 中获取 kendo.all.min.js 和 jquery.min.js 并且没有任何变化..
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-16
    • 1970-01-01
    • 2013-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多