View Full Version : Store not loading first time combo is opened

12 Mar 2014, 5:48 AM
Hi all,

I have a combo box which is part of a form. I get the combo box data by getting a child store with the info but when I first open the form the default value it is supposed to display is not there. But if I close the form and reopen it, the data populates fine. It seems to me that the store is not loaded at this time for some reason, is there any way to not open the form until the store is fully loaded?

xtype: 'combo'
,id: 'userTypeCombo'
,name: 'userType.id'
,store: sto.getChildStore("userTypeList")
,fieldLabel: 'User Type'
,valueField: 'key'
,value: 1
,displayField: 'value'
,editable: false
,queryMode: 'local'
,emptyText: 'Select User Type...'
,triggerAction: 'all'

12 Mar 2014, 6:40 AM
Has the store been loaded prior?

12 Mar 2014, 6:43 AM
I was able to solve this issue by just setting the values from the controller using the onFormLoad function.

onFormLoad: function(win, formStore, record) {