我对rowediting插件在grid上有个问题。
我有一个5 columns的columns,只有1列有一个编辑器。我正在使用rowediting插件。
我的编辑器是一个textfield,我有一个更改监听器。每次更改这个textfield时,我都需要更新另一个列值,但这是在我完成版本时完成的(按Enter键)。
我使用了从商店重新配置的方法,rowediting被取消了,并且不想要这种行为。
如何更新我的网格保存行版本?
发布于 2015-01-30 21:07:41
如果我没听错的话,就像这样
if (field.getKey() == field.ENTER) {
var record = editor.ownerCt.ownerCmp.getSelectionModel().getSelection()[0],
store = editor.ownerCt.ownerCmp.getStore(),
newValue = editor.getValue();
// enter key pressed
if (record) {
record.set("name", newValue);
record.set("fullname", newValue + ' Simpson');
record.commit();
store.load();
}
}https://stackoverflow.com/questions/28233689
复制相似问题