magicyzzj 2010-09-02 08:15
浏览 323
已采纳

Ext editgrid 如何获得修改后的record

以前一直用jQuery的,最近开始自己搞一些EXT的,画面看起来不错,不过,最近在做editgrid的保存时候遇到麻烦!
1。使用var records=store.getModifiedRecord()得到修改后的记录集,
2。下来再使用Ext.each(records,function(m){
alert(Ext.util.JSON.encode(m.json));
});
那个alert得到的一直都是未修改前的记录,请问,我要怎么样才能得到修改过的数据呢?
请各位赐教!本人将不甚感激!

  • 写回答

1条回答 默认 最新

  • cyrilluce 2010-09-02 08:35
    关注

    不应该访问record的json,它是ArrayReader和JsonReader创建的record特有的属性,用于存储读取前的源对象。

    [quote]
    Only present if this Record was created by an {@link Ext.data.ArrayReader ArrayReader} or a {@link Ext.data.JsonReader JsonReader}
    The Array or object which was the source of the data for this Record.
    @property json
    @type {Array|Object}
    [/quote]

    你应该访问record.data

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?