关于ExtJS Row editing 行编辑 后 获取 编辑后记录值 的方法

时间:2023-03-08 22:41:26
listUsersGrid.on('edit', function(editor, e) {
var pass = editor.record.data.password;
editor.record.data.password = hex_md5(pass);
store.sync();
});
listUsersGrid 是一个grid panel

使用chrome debug 定位到以上回调函数内,就可以很容易发现: editor.record.data.password;  可以获取当前编辑好的记录的新值

如图:
关于ExtJS Row editing 行编辑 后 获取 编辑后记录值 的方法

其中的 data 对应 model 的每个属性