我需要定期在网格的存储中添加新数据。商店由以下代码定义:
this.reader = new Ext.data.JsonReader({
idProperty: 'id',
fields: this.lesFields
});
this.ds = new Ext.data.GroupingStore({
reader: this.reader,
data: this.leData,
sortInfo: {field: 'dendisc', direction: 'ASC'},
groupField: 'categorie'
});
当我需要附加一些新数据时,我使用this.getStore().loadData(this.leData). 从技术上讲,数据确实出现在网格的存储中,但我在显示器上只看到零(在int字段中)和空白字符串(在string字段中)。我在 Chrome 的控制台中做了一些研究,发现data属性和json属性在this.getStore().data. 里面有json包含有效数据的数组,但data里面只有零和空白字符串。
我错过了什么吗?该handleAs:'json'物业会挽救局面吗?