我有一个PropertyEditor在ExtJS。
Ext.define('PropertyEditorGrid', {
//...
this.flexColumnGrid = Ext.create('Ext.grid.property.Grid', {//...
listeners:{
propertychange: function (source, recordId, value,oldValue,eOpts){
me.valueChange(me.id,recordId,value==null?null:value.toString(), oldValue==null?null:oldValue.toString());
}
}//...
}我想要使用'propertychange‘函数,如果值不合适,则以红色打印网格单元格文本,否则以黑色打印。我试着使用http://skirtlesden.com/articles/styling-extjs-grid-cells,但它对我没有帮助。
发布于 2015-08-13 14:35:07
你可以这样做
Ext.get(e.row.getElementsByTagName('td')[e.colIdx]).addCls('wrongclass'); 在编辑事件中
如果需要,可以使用validateEdit取消编辑。
https://stackoverflow.com/questions/31984059
复制相似问题