Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update or Reload Store of ExtJs ComboBox

Tags:

extjs

I'd like to know a way of how to update or reload the list values of a ExtJs ComboBox. For instance, I have a some checkboxes. These checkboxes determine what values the ComboBox should have. So, after selecting some of those, I click the drowndown list (combobox) to see the values.

In short, how can I change the values (store) of a ComboBox already has.

Hope someone can help me

Thanks

like image 425
user512514 Avatar asked Nov 18 '10 18:11

user512514


1 Answers

It goes a little something like this

{
  xtype: 'checkbox',
  //configs
  listeners : {
     checked : function (checkbox, checkedBool) {
         var yourCombo = Ext.getCmp(yourComboID);

         //I'm not sure what params you will need to reload the comboBox from your
         // service but hopfully this will give the jist of things. . .

         yourCombo.store.reload(
                  {   
                     params: 
                         {yourParam : checkedBool},
                         {yourRowID : rowID}
                    });
      }
 }
like image 160
It Grunt Avatar answered Sep 27 '22 18:09

It Grunt