Ext.grid.PropertyGrid添加Ext.form.ComboBox的格式化

在Ext.grid.PropertyGrid的listeners中加入以下代码:

SqlList为cmbox的属性行的id

SqlListCombo为下拉框的id

 

afteredit: function(o){
       if('SqlList' == o.record.id){
        var combo = Ext.getCmp('SqlListCombo');
        var record = combo.findRecord(combo.valueField, o.value);
           var src = propertyGrid.getSource();
           src['SqlList'] = record.get(combo.displayField);
           propertyGrid.setSource(src);
       }
}

 

 

 

 

 

 

 

你可能感兴趣的:(ext)