Am going to bind the data to combobox store dynamically. below is the combobox how to define the properties and all.
In controllerthe code will be.
xtype:
'combobox',
width:
'10%',
reference:
'Amount',
fieldLabel:
'Amount',
labelSeparator:
"",
labelAlign:
'top',
queryMode:
'local',
store:
new
Ext.data.JsonStore({
fields: ['id',
'display',
'value']
}),
displayField:
'display',
valueField:
'value',
emptyText:
'Select',
name:
'relationType',
submitEmptyText:
false,
allowBlank:
false,
style:
'141px',
listeners:
{
change:
'onSelectionChange'
}
In controllerthe code will be.
var
multiplyCombo = fieldsContainer.down('combobox').getStore();
var
bulkAddArray = [];
for
(var
i = 1; i <= multiplyFactor; i++) {
bulkAddArray.push({
display:
i,
value:
i
});
}
multiplyCombo.loadData(bulkAddArray,
true);
No comments:
Post a Comment