清除网格 extjs 中的组合框值

clear combobox value inside grid extjs

我有一个包含 to 列的网格。第二列有带 xtype 的编辑器:combobox。 所以这是我的网格:grid

我想在第一个组合框更改时清除第二行的组合框。我尝试使用 edit( editor, e, eOpts ) 执行此操作,但当我尝试检索第二个组合框时,我有点困惑。像这样:

var combobox1=editor.grid.columns[1].getEditor(e.record, 1)

它给了我当前的组合框,所以我不能再选择另一个组合了。 你能帮帮我吗

如果你想让row2 val2为空,你首先要从store中获取第二行的记录,你可以这样做:

如果你知道第二行id:

secondRecord = grid.getStore().getById(ROW2_ID)

如果您知道行索引:

secondRecord = grid.getStore().getAt(1)

然后你就做

secondRecord.set(VAL2_FIELD_NAME, "")