为什么 Kendo 使用自定义方法进行端点通信的 DataSource 总是发送相同的对象进行删除?

Why Kendo DataSource using custom method for endpoint communication sends always the same object for deletion?

我有一个 Kendo 网格,我在其中使用自定义方法与服务器通信。这些方法使用 Restangular 实现。

我可以毫无问题地添加(创建新的)对象。

场景 1:

场景 2:

数据源属性:

到目前为止我做了什么:

我认为问题可能在于,服务器 returns 与 Kendo 数据源预期的有所不同。我的服务端点 returns a HttpStatusCode.Accepted (202) 并且没有附加数据。但我在 Telerik 找不到任何关于他们期望的信息。更何况还没有定义删除后应该返回什么

有人遇到过这个问题并解决了吗? 有人知道删除后 Telerik 的数据源期望从服务器返回什么吗?

我在 documentation 中发现,在更新的情况下,空响应被视为成功。此外,我已将 delete 的结果传递给 e.success() ,这导致了奇怪的行为。

private destroyModuleScreen( e: kendo.data.DataSourceTransportOptions ): kendo.data.DataSourceTransportOptions {

            var contract: IKendoModuleScreenContract = <IKendoModuleScreenContract>( e.data.models[0] );

            this.moduleScreensService.deleteModuleScreen( contract ).then(( result: any ) => {
                e.success();

                //wrong
                //e.success(result.plain());
            }, ( reason ): any => {
                e.error( reason );
            });

            return e;
        }