2つのコンボボックスがあり、「sg」キーと「aod」キーの2つのコンボのデータを含む1つのストアを使用しています。
最初のコンボで、「sg」キー内にデータを入力したいとします。
2番目のコンボでは、データに「aod」というキーを入力します。
次に、コンボをレンダリングしながらデータを入力するにはどうすればよいですか?
これが私の店です:
var myStore = Ext.create('Ext.data.Store', {
fields: [{
name: 'sg'
}, {
name: 'aod'
}],
data: [{
'sg': ['1', '2', '3', '4', '5']
}, {
'aod': ['15', '20']
}
]
});
Here is my comobos inside items config
defaults: {
labelAlign: 'top',
width: '20%',
style: {
textAlign: 'center',
color: '#0a4374',
fontSize: '12px',
fontWeight: 'bold'
},
labelSeparator: '',
allowEmpty: false,
editable: false,
cls: 'extraComboBox',
xtype: 'combo',
autoSelect: true,
margin: 10
},
items: [{
fieldLabel: 'Combo 1',
value: '',
//Here I want to load myStore.data.items[0].data.sg
},
{
fieldLabel: 'Combo 2',
value: '',
//myStore.data.items[1].data.aod
}
ご協力いただきありがとうございます!!