14 Jul 2013 3:57 PM #1
Unanswered: How to loadRecord when form has comboBox filled by DirectStore
I have a form with a comboBox that gets it's data via a DirectStore. The comboBox loads it's data fine, but the problem is it is loaded AFTER I call getForm.loadRecord(), so the value of my record is not selected in the combo.
I know i can listen for the store's read event, but is there any good way to manage this? What if I have 2 comboBoxes etc?
My code creates the form, which creates the combo, then loads the record into the form.
Seems like this is a common problem, just looking for advise on the best way to deal with it.
16 Jul 2013 9:53 PM #2
- Join Date
- Mar 2009
- Boise, ID
- Vote Rating
Listening to the stores' load events is what came to mind for me. Having the form load values as a response to the events seems the best way to ensure the data is loaded to the fields first since the data for the combos will come back asynchronously.Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: email@example.com