2
我需要在編輯功能中編輯網格單元值,而不是在validateedit函數中恢復(設置值爲編輯值之前)。Extjs4,如何在編輯功能中恢復編輯後的網格單元值?
"orderList": {
validateedit: function (plugin, edit) {
//validate...
},
edit: function (plugin, edit) {
Ext.MessageBox.confirm('Confirm', 'Are you sure to change this order status?', function (btn) {
if (btn == 'yes') {
//update
} else {
// I want to rollback!
edit.cancel = true;
edit.record.data[edit.field] = edit.originalValue; //it does not work
}
});
}
}
如何更改網格單元格值(編輯器)?
謝謝!
非常感謝! – 2012-07-26 02:24:27