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.
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.