Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to render combobox dropdownlist
    primarykey
    data
    text
    <p>I am having trouble filtering an array store.</p> <p><strong>Situation</strong></p> <p>I have 2 comboboxes with an array store. combobox 1 and combobox 2, both are in mode 'local' and have a predefined array store. when i click and select a row in the first combobox, I apply a filter on the second combobox (which was not yet cliked upon). The thing is that the second combobox did not render it's data (or html) yet so the filter wasn't applied. </p> <p>when i click on the second combobox, and then clicking on the first, the filter is applied and working.</p> <p>my question is, how to pre-render an array_store/combobox?</p> <p>I did try to expand the combobox first, but also didn't work for me. (see commented code)</p> <pre><code>var store1 = new Ext.data.ArrayStore({ fields: ['id','name'], data:somedata //array of some data }); var store2 = new Ext.data.ArrayStore({ fields: ['id','name'], data:somedata //array of some data }); var combobox1 = { name: 'combobox_1', xtype: 'combo', hiddenName: 'combobox_1', store: store1, displayField:'name', valueField:'id', mode:'local', triggerAction: 'all', allowBlank:true, emptyText:'Select...', listeners:{ select: function(st, r){ var selected = r.get('name'); var combobox2 = Ext.getCmp('combobox2'); //combobox2.expand(); combobox2.store.filter([ { property : 'name', value : selected, anyMatch : true, caseSensitive: false } ]); }, scope:this } } var combobox2 = { name: 'combobox_2', xtype: 'combo', hiddenName: 'combobox_2', store: store2, id: 'combobox2' displayField:'name', valueField:'id', mode:'local', triggerAction: 'all', allowBlank:true, emptyText:'Select...', } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload