0

我有一个包含列名称、值、新值的网格。新值列是组合框,因为可以有几个值。管理员可以批准/拒绝新值并更正建议的这些新值。

我的网格列如下所示:

columns: [
            { text: 'Name', dataIndex: 'property_name', width: 300 },
            { text: 'Value',  dataIndex: 'value', width: 350 },
            {
                text: 'New Value',
                dataIndex: 'new_value',
                width: 350,
                editor: { allowBlank: true },
                renderer: function(value, cell, record){
                    return record.get('new_value') == record.get('value') ? '' : record.get('new_value');
                }
            },
        ],

那么有没有办法实现上述功能?

4

1 回答 1

2

editor配置采用任何 Ext.form.Field 配置(默认为textfield),例如:

editor:{
  xtype:'combobox', // <- this tells 
  store:'MyNewValueStore',
  forceSelection:true,
  queryMode:'local',
  ...
}
于 2016-03-12T08:27:45.043 回答