项目不显示在下拉列表extJS中
我的页面中有一个组合框?看起来像这样 商店 组合配置项目不显示在下拉列表extJS中,extjs,Extjs,我的页面中有一个组合框?看起来像这样 商店 组合配置 var selectStyleComboboxConfig = { fieldLabel: 'My Dropdown', name: 'type', allowBlank: false, editable: false, // This is the option required for "select"-style behaviour triggerAction: 'all', ty
var selectStyleComboboxConfig = {
fieldLabel: 'My Dropdown',
name: 'type',
allowBlank: false,
editable: false,
// This is the option required for "select"-style behaviour
triggerAction: 'all',
typeAhead: false,
mode: 'local',
width: 120,
listWidth: 140,
hiddenName: 'traffic_source',
/*store: [
['val1', 'First Value'],
['val2', 'Second Value']
],*/
store: sourcesStore,
readOnly: true
};
这里有一个项目
items: [
fileField,
new Ext.form.DateField({
xtype: 'datefield',
fieldLabel: 'Start date',
name: 'startdate',
format: 'd-m-Y'
}),
new Ext.form.DateField({
xtype: 'datefield',
fieldLabel: 'End date',
name: 'enddate',
format: 'd-m-Y'
}),
new Ext.form.ComboBox(selectStyleComboboxConfig)]
问题是它不会在下拉列表中显示要选择的项目。我们在项目中使用Ext2.3.0,当我单击选择时,我看到一个很长的下拉列表,但它是空的。我是extJS新手,我迫切需要帮助来度过这个难关。对不起,我的英语,如果需要更多的信息或细节,请告诉我 谢谢,答案很简单。我刚才补充说
valueField: 'id',
displayField: 'name'
现在好了
valueField: 'id',
displayField: 'name'