javabee
17 Dec 2010, 7:07 AM
Hi all, i'm having a couple of problems using the combo for a simpleStore? Combo populates fine but never autoSelects the first element? If i enforce selection though setValue etc then this is fine but if i try to access the value using getValue() it returns the value of the 'displayField' e.g in this case 'first'/'second' etc. If i then select an item from the list and then access the value again using getValue() then it returns 1/2/3 as would be expected? Its almost as if the 'values' are not set until the combo receives a 'select' event?
var store = new Ext.data.SimpleStore(
{
id: 'testStore',
fields: ['id','description'],
data : [['1','first'],['2','second'],['3','third']]
});
var combo = new Ext.form.ComboBox(
{
store: store,
displayField: 'description',
valueField: 'id',
mode: 'local'
});
var store = new Ext.data.SimpleStore(
{
id: 'testStore',
fields: ['id','description'],
data : [['1','first'],['2','second'],['3','third']]
});
var combo = new Ext.form.ComboBox(
{
store: store,
displayField: 'description',
valueField: 'id',
mode: 'local'
});