PDA

View Full Version : Ext ComboBox issue



spothineni
10 May 2007, 3:08 PM
Hi,

To get the combobox getvalue is it compulsory to use support input test box by saying the combobox.applyTo(input textbox).Bacause i was not able to get the value from combo.getValue() it is giving combo undefined error.pls can some one help me to sort out this bug.

//--------Status DropDown-----------------------------------
var myData = [
['All','All'],
['Open','Open'],
['Closed','Closed'],
['---------','---------'],
['Accepted','Accepted'],
['Declined','Declined'],
['New','New'],
['Resolved','Resolved'],
['Duplicate','Duplicate']
];
var RecordDef = Ext.data.Record.create([
{name: 'id', mapping: 0},
{name: 'value', mapping: 1}
]);

var ds = new Ext.data.Store({
fields: ['id', 'value'],
proxy: new Ext.data.MemoryProxy(myData),
reader: new Ext.data.ArrayReader({id: 0},
RecordDef)
});
ds.load();
var statusCombo = new Ext.form.ComboBox({
store: ds,
displayField:'value',
valueField: 'id',
mode: 'local',
triggerAction: 'all',
emptyText:'Select status...',
forceSelection: true,
selectOnFocus:true,
width : 100,
editable: false
});
alert(statusCombo.getValue());

jsakalos
10 May 2007, 3:12 PM
This is at least third time I see this code on this forum. What effort you have made to make it working? You see, we can help but nobody will write or debug code for you.