Kendo ui DataSource transport.destroy称为+;每次连续删除1次(针对以前删除的项目召回)

Kendo ui DataSource transport.destroy称为+;每次连续删除1次(针对以前删除的项目召回),kendo-ui,kendo-grid,kendo-datasource,Kendo Ui,Kendo Grid,Kendo Datasource,我的代码中有一个支持销毁的数据源。为了从it中删除对象,我直接调用remove,即 myDataSource.remove(discardedData); 我有一种类似的行为。但是,与链接线程不同,mydestroy没有设置为函数,因此解决方案对我没有帮助 我的数据源(我包括了所有数据源,以防我的某些配置受到责备): 我找不到任何线索来解释为什么会发生这种情况。多亏我找到了问题所在 咨询时,我将httpDELETE响应从200OK更改为204no content问题可能与您引用的链接中的问题相

我的代码中有一个支持销毁的
数据源
。为了从it中删除对象,我直接调用
remove
,即

myDataSource.remove(discardedData);
我有一种类似的行为。但是,与链接线程不同,my
destroy
没有设置为函数,因此解决方案对我没有帮助

我的数据源(我包括了所有数据源,以防我的某些配置受到责备):

我找不到任何线索来解释为什么会发生这种情况。

多亏我找到了问题所在


咨询时,我将http
DELETE
响应从200
OK
更改为204
no content

问题可能与您引用的链接中的问题相同:执行销毁的结果不是通知它已正确完成。您的服务应该返回一个适当的结果,以便通知
destroy
它实际上已被删除。
       var QueueMessages = {
        type: "aspnetmvc-ajax",
        transport: {
            read: {
                url: BASE_URL + "api/QueueMessages/GetMessagesHeaders",
                dataType: "json",
                type: "GET",
                beforeSend: function (req) {
                    req.setRequestHeader('Authorization', authService.getAuth());
                }
            },
            destroy: {
                url: BASE_URL + "api/QueueMessages/deleteMessage",
                dataType: "json",
                type: "DELETE",
                beforeSend: function (req) {
                    req.setRequestHeader('Authorization', authService.getAuth());
                }
            }
        },
        schema: {
            model: {
                id: "id",
                fields: {
                    profileName: { type: "string" },
                    queueType: { type: "string" },
                    acceptedAt: { type: "date" },
                    processedAt: { type: "date" },
                    BodyExcerpt: { type: "string" }
                }
            },
            total: "total",
            data: "data",
        },
        error: function (e) {
            //throw user back to login page
            if (e.errorThrown === "Unauthorized")
                $rootScope.$apply($location.path('/'));
        },
        requestStart: function () {
        },
        requestEnd: function () {
        },
        pageSize: 50,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true,
        serverGrouping: true,
        serverAggregates: true
    };