kendo 当列名为数据时,网格为空

kendo grid is blank when column name is data

我的kendo网格数据源包含一个字段"data",所以显示的网格是空白的。这是 telerik link 有人可以告诉我如何解决这个问题吗?我没有选择将列名更改为我正在工作的项目中的其他名称

 var data = [{data:"test",attribute:"my title"},{data:"test",attribute:"my title"}];

  var grid = $("#grid").kendoGrid({
    dataSource: data,
    columns: [
      {field: 'data', title: 'Data'},
      {field: 'attribute', title: 'Attribute'}
            ]
    }).data("kendoGrid");
});

schemamodel中定义它,像这样:

  var data = [{data:"data 1",attribute:"my title"},{data:"data 2",attribute:"my title"}];

  var grid = $("#grid").kendoGrid({
    dataSource: {
        data: data,
        schema: {
            model: {
              fields: {
                foo: { from: "data" }
              }
            }
        },
    },
    columns: [
      {field: 'foo', title: 'Data'},
      {field: 'attribute', title: 'Attribute'}
    ]
  }).data("kendoGrid");

工作示例:Schema model