Results 1 to 3 of 3

Thread: Restting combobox store contents

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Posts
    127

    Default Restting combobox store contents

    I have the following code inside a combo select:

    var cboModel = Ext.getCmp('id_combo_model');
    cboModel.setValue(
    '');
    cboModel.store.setBaseParam(
    'id_manufacturer', id_manufacturer);
    cboModel.store.reload();

    Basically it's reassigning the manufacturer of the proceeding combobo to re-populate the list based on manufacturer selected. I swear this worked before now I have tried this in several different areas and it only seems to work on the first selection of the manufacturer. If I change manufacturer again, nothing seems to happen.

    What properties have I possibly changed to cause this undesired effect?

    Cheers,
    Alex


  2. #2
    Sencha User
    Join Date
    Jul 2010
    Posts
    20

    Default

    I think I may have the same problem. I am relatively new to extjs and I have a toolbar with next/prev buttons. Using setBaseParams to set a grid refresh. If the user clicks the next button then the BaseParam 'action' is set to next, previous button then previous. What appears to be happing is the first value that is set via setBaseParam, sticks.

    Basically if I click previous button first then the BaseParam 'action' never gets set to next. If I click the next button first then the param 'action' never changes to previous.

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Is this a mode:'remote' combobox?

    In that case use:
    Code:
    var combo = Ext.getCmp('id_combo_model');
    combo.clearValue();
    delete combo.lastQuery;
    combo.store.setBaseParam('id_manufacturer', id_manufacturer);
    (no need to reload - combobox will do that for you when first used)

Similar Threads

  1. Replies: 4
    Last Post: 23 Aug 2010, 12:44 PM
  2. Setting Window Contents to Store Records
    By mikecx in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 14 Oct 2008, 7:38 AM
  3. Grid not displaying store contents
    By vendiddy in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 21 Mar 2008, 4:35 PM
  4. Controlling combobox contents?
    By sidthegeek in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 4 Dec 2007, 10:20 AM
  5. Remote loading of combobox contents
    By Tina G in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 26 Nov 2007, 5:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •