PDA

View Full Version : How to fill an extjs textbox on chnage of extjs combobox



jainanuj82
11 Dec 2009, 2:48 AM
Hello,

I am facing issues in creating an ExtJs textbox. I have created an ExtJs combobox with the following code :
var supplier = new Ext.data.SimpleStore({
proxy: proxy,
totalProperty: 'totalRows',
root:'subcoList',
fields: [
{name: 'code', mapping: 'code', header:'code' , type: 'string'} ,
{name: 'descr',mapping: 'descr', type: 'string'}
]
});

var supplierCombo = new Ext.form.ComboBox
({
store: supplier,
id:'supplierCombo',
fieldLabel: 'Select Supplier',
displayField: 'descr',
valueField: 'code',
mode: 'local',
applyTo:'supplier',
hidetrigger: false,
triggerAction: 'all',
editable: true,
xtype: 'combo',
width:250,
resizable:true,
lastQuery:''
listeners:
{
select: function(combo, record)
{
var comboCity = Ext.getCmp('supplierCombo');
comboCity.clearValue();
comboCity.store.load({params :{'val' : record.get('code'),'comboType' : 'subcontractorCombo'} });
}
}
});


My problem is that i need to fill a textbox on the selection of this combobox.

Thanks to reply.
Please paste some code as well ..:D

Please reply soon..

Thnaks

jainanuj82
11 Dec 2009, 2:50 AM
just to add..

I need this data from the database...