PDA

View Full Version : Data for Combo Box from Database



chsrinivasgupta
30 Aug 2012, 11:48 PM
I would like to have a combo box and values for this combo box should be from database. Please send me some sample code. Thanks in advance.

vdaiev
31 Aug 2012, 7:06 AM
Hi,
See example below:



var actionsStore = Ext.create('Ext.data.Store', {
model: 'ModelName',
autoLoad: true,
proxy: {
type: 'ajax',
method: 'GET',
url: yourUrl
reader: {
type: 'json'
}
}
});


xtype: 'combo',
editable: false,
width: 160,
id: 'ddlAppType',
store: actionsStore,
valueField: 'Value',
displayField: 'Name'