如何使用 Kendo UI for Angular 2 网格更新和刷新数据?

How to grid updated and refresh data with KendoUI for Angular2?

我正在使用 Kendo UI 网格来编辑记录。

我有加载数据功能:

  private loadData(): void {
      this.gridView = {
          data: this.data.slice(this.skip, this.skip + this.pageSize),
          total: this.data.length
      };
  }

我有一项服务可以更新数据并将其存储在 this.data content:

this.dataservice.update().then(res => this.loadData());

但是,UI 没有更新。我应该如何更新网格 UI?

如果网格未更新,我想 loadData() 方法中的更改未检测到。

plunker 中的一个简单测试表明这种简化的方法工作得很好:

Plunker Demo

附带说明一下,如果您没有看到特定行模板中的更改,那么这是一个记录在此处的已知问题:

Kendo Grid for Angular 2 Issue