PDA

View Full Version : Help: Problem with preselect combo box value



Joe Kuan
12 Oct 2010, 8:43 AM
Hi,

I am experimenting the combo example /extjs/examples/form/combos.js. I added the line to preselect the value on the combo box using selectByValue

var converted = new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
transform:'state',
width:135,
forceSelection:true
});

converted.selectByValue('OH', true);

However, this gives javascript error:

TypeError: Result of expression 'this.view' [undefined] is not an object. ext-all.js

What have I done wrong?

Many thanks
Joe

troseberry
12 Oct 2010, 12:40 PM
try setValue() method