I have a non-editable ComboBox which displays a list of users and "Go" button next to it. Under normal circumstances the user is prompted to select an option from the list and press the "Go" button. However, under certain conditions I need to automatically select the first item on the list and programmatically press the "Go" button. I've got the button pressing sorted, but can't seem to select the first item on the list?

Using the Ext.form.ComboBox.setValue() method I can select the first item programmatically no problem, e.g.,
PHP Code:

but the problem is that the list of users is dynamic and I won't know what the Id is of the first user on the list. I looked in the docs and it seemed as though Ext.form.ComboBox.select(index) should do the job by using .select(0) but only if the "store [is] loaded and the list expanded". Well the items have been successfully added to the list so I'm assuming the store has been loaded, but calling Ext.form.ComboBox.expand() seems to have no effect. This appears to be because in ext-all.js, line 200, the definition for expand() returns when:

PHP Code:

and in my case !this.hasFocus is true even though the element doesn't have focus.

Help! I just want to pick the first list item!