Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想禁用行编辑插件取决于组合选择,我有网格参考。我怎样才能禁用它?(我试图破坏它,但是当我关闭窗口时,我得到一个“未捕获的类型错误:无法调用未定义的方法'getView'”。
false从 RowEditingbeforeedit事件返回。
false
beforeedit
listeners: { beforeedit: function(editor, context){ if(comboBox.getValue() === /* whatever conditions you have */){ return false; } } }
您也可以设置context.cancel = true来实现相同的效果,但我真的看不出它的意义,因为false从beforexyz事件返回是 Ext JS 4 库中的标准习惯用法。
context.cancel = true
beforexyz