Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to work with treecombo in Extjs 4.1
    primarykey
    data
    text
    <p>I found tutor in <a href="http://www.sencha.com/forum/showthread.php?198856-Ext.ux.TreeCombo" rel="noreferrer">http://www.sencha.com/forum/showthread.php?198856-Ext.ux.TreeCombo</a><br> I try to make a treecombo in Extjs4.1 in <b><a href="http://jsfiddle.net/rq2ha/" rel="noreferrer">http://jsfiddle.net/rq2ha/</a></b> here is my code</p> <pre><code>Ext.onReady(function() { Ext.create('Ext.ux.TreeCombo', { margin:10, width:120, height: 10, treeHeight: 10, treeWidth: 240, renderTo: 'treecombo3', store: storeMenu, selectChildren: false, canSelectFolders: true ,itemTreeClick: function(view, record, item, index, e, eOpts, treeCombo) { var id = record.data.id; // I want to do something here. // But combo do nothing (not selected item or not finish) when i init itemTreeClick function } }); }); </code></pre> <p><b>1st problem:</b> I want to get id of tree and do something When i click item of tree on combo. But combo not complete (seleted) when i click (combo do nothing). <img src="https://i.stack.imgur.com/fRgKq.png" alt="enter image description here"></p> <p><b>2nd problem:</b> if i change store is dynamic like</p> <pre><code>var treestore = Ext.create('Ext.data.TreeStore', { proxy: { type: 'ajax', url: 'example.php', reader: { type: 'json' } }, autoload: true }); </code></pre> <p>I will get error</p> <p><img src="https://i.stack.imgur.com/zOpov.png" alt="enter image description here"></p> <p>my json</p> <pre><code>[ { id : '1' , text : 'a', iconCls: 'cls1' ,children :[{ id : '2' , text : 'b', iconCls: 'cls2' ,children :[{ id : '9' , text : 'a', iconCls: 'cls' ,children :[]},{ id : '14' , text : 'a', iconCls: 'c' ,children :[{ id : '33' , text : 'b', iconCls: 'cls' ,children :[{ id : '35' , text : 'a', iconCls: 'cls' ,children :[{ id : '36' , text : 'a', iconCls: 'cls' ,children :[]}]}]}]},{ id : '16' , text : 'd', iconCls: 'cls' ,leaf:true}]},... </code></pre> <p><br> How can i fix that thank </p>
    singulars
    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.
 

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