View Full Version : setValue and Ext.form.Select

7 Dec 2010, 4:14 AM
I have problems selecting an value from a select field.

this.paymentSelect = new Ext.form.Select({
name: 'payment',
hiddenName: 'hdPayment',
label: 'Payment',
valueField: 'id',
displayField: 'description',
value: defaultValue

this.paymentSelect.store = store;

I had to set the store after the initial creation or else it did not work but that is not a major issue.

The problem I have is that the value only sets the default value when I click the select box and not the actual initial display value in the "text field". Is there any way to get it default the display text in the field like it does with the DatePicker?

7 Dec 2010, 4:47 AM
Typical I managed to get it to work just right after posting this.

Setting it with setValue after instead of in the constructor seems to work for me. I'm pretty sure tested that a couple of hours ago too, but not sure what else have been changed.