View Full Version : What's the correct way of pre-populating a ComboBox before doing a Form.load?

14 Sep 2010, 8:39 PM
I have a ComboBox called Country with a remote JsonStore inside a Form. My problem is when I call the Form's load() method, the ComboBox shows the id of the country instead of the name. I understand that this is because the store of the ComboBox is not yet populated.

A call to form.getForm().findField('country_id').getStore().load() loads the data but doesn't seem to "bind" into the combobox. I can tell because if I click the trigger, it does another load() call.

I tried searching for previous threads about this but can't find any (form, load, combobox, prepopulate, etc). I don't think this is a new problem so I'd like to ask if anyone can help point me to the right direction.


14 Sep 2010, 8:42 PM
Sorry! After I posted the thread, the answer came in one of the similar threads result!

30 Sep 2010, 6:56 AM
Could you please post the solution or a link? Thx

Edit: Maybe this helps: http://www.sencha.com/forum/showthread.php?75751-OPEN-42-ComboBox-s-setValue-call-with-a-remotely-loaded-Store&p=400274#post400274