1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    75
    Vote Rating
    -1
    bareflix is an unknown quantity at this point

      0  

    Default Unanswered: How to loadRecord when form has comboBox filled by DirectStore

    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.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,468
    Answers
    441
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    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 recruiting manager: sheryl@sencha.com

Thread Participants: 1