有没有办法使ExtJS4 PropertyGrid (Ext.grid.property.Grid)不可编辑?
没有“可编辑”或“只读”配置选项AFAICS。
发布于 2013-02-15 21:19:26
另一种解决方案是添加一个监听程序,以防止启动编辑组件:
listeners: {
'beforeedit': {
fn: function () {
return false;
}
}
}这种解决方案的问题是,不能标记单元格以复制(Ctrl+C)内容。
发布于 2013-09-21 06:35:43
使用sourceConfig将编辑器设置为Ext.form.DisplayField
Ext.create('Ext.grid.PropertyGrid', {
sourceConfig: {
field1: {
displayName: 'Editable Field'
},
field2: {
displayName: 'Readonly Field',
editor: Ext.create('Ext.form.DisplayField')
}
},
source: {
field1: "Some property",
field2: "Some other property",
}
});发布于 2014-10-15 22:02:09
还有一个决定,但之后不允许选择文本:myGrid.findPlugin('cellediting').disable();
https://stackoverflow.com/questions/13174929
复制相似问题