jsgrid更新后返回空白行

时间:2018-09-19 01:38:27

标签: jsgrid

在jsgrid中通过ajax提供更新后,该行返回空白

Cat

在返回网址更新中:controller: { loadData: function(filter) { var data = $.Deferred(); $.ajax({ type: "GET", contentType: "application/json; charset=utf-8", url: "/app/Play/", dataType: "json" }).done(function(response) { data.resolve(response); }); return data.promise(); }, updateItem: function(item) { return $.ajax({ type: "POST", url: "/app/Play/change.php", data: item, }); }, }

我以普通json返回更新后的记录数据,与加载中使用的初始json相同

1 个答案:

答案 0 :(得分:0)

已解决:

controller: {
    loadData: function(filter) {
        var data = $.Deferred();
        $.ajax({
            type: "GET",
            contentType: "application/json; charset=utf-8",
            url: "/app/Jogos/app/",
            data: filter, // <--Insert line, this is a problem
            dataType: "json"
        }).done(function(response) {
            data.resolve(response);
        });
        return data.promise();
    },
    updateItem: function(item) {
        return $.ajax({
            type: "POST",
            url: "/app/Jogos/app/change.php",
            data: item
        });
    },
},