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
    4,805
    Answers
    359
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 1