-
23 Feb 2008 12:22 AM #1
[2.x] ComboBox Tree
[2.x] ComboBox Tree
Hi all:
here I have two examples about the comboBox, the first with a tree, the second with a panel, exactly with what you want
First example:
second example:HTML Code:var comboxWithTree = new Ext.form.ComboBox({ store:new Ext.data.SimpleStore({fields:[],data:[[]]}), editable:false, shadow:false, mode: 'local', triggerAction:'all', maxHeight: 200, tpl: '<tpl for="."><div style="height:200px"><div id="tree1"></div></div></tpl>', selectedClass:'', onSelect:Ext.emptyFn }); var tree1 = new Ext.tree.TreePanel({ loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}), border:false, root:new Ext.tree.AsyncTreeNode({text: 'treeRoot',id:'0'}) }); tree1.on('click',function(node){ comboxWithTree.setValue(node.text); comboxWithTree.collapse(); }); comboxWithTree.on('expand',function(){ tree1.render('tree1'); }); comboxWithTree.render('comboxWithTree');
HTML Code:var comboxWithPanel = new Ext.form.ComboBox({ store:new Ext.data.SimpleStore({fields:[],data:[[]]}), editable:false, mode: 'local', triggerAction:'all', maxHeight: 200, tpl: '<div style="height:200px"><div id="panel"></div></div>', selectedClass:'', onSelect:Ext.emptyFn }); comboxWithPanel.render('comboxWithPanel'); var tree2 = new Ext.tree.TreePanel({ loader: new Ext.tree.DWRTreeLoader({dwrCall:Tmplt.getTmpltTree}), border:false, autoScroll:true, root:new Ext.tree.AsyncTreeNode({text: 'root',id:'0'}) }); var border = new Ext.Panel({ title:'title', layout:'fit', border:false, height :200, tbar:[{text:'ok1'},'-',new Ext.form.TextField({id: 'bb',width:60}),{text:'search1'}], bbar:[{text:'ok2'},'-',new Ext.form.TextField({id: 'aa',width:60}),{text:'search2'}], items: tree2 }); comboxWithPanel.on('expand',function(){ border.render('panel'); });
-
23 Feb 2008 1:25 AM #2
Any demo? Or a screenshot at least? Otherwise I don't know if it is "exactly what I want"
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
23 Feb 2008 3:57 AM #3
-
23 Feb 2008 4:06 AM #4
Thanks for pictures. Interesting. I have no immediate use for it but it's good to know that this extension exists and that we can use it when the situation comes.
Thank you for your work.Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
25 Feb 2008 1:09 PM #5
Nice I'll need something like this in the near future, looks like it still needs some finetuning, but nice work!
-
12 Mar 2008 8:10 AM #6
Great, but how to set the params to submit ? e.g. I need to submit the selected category_id and category_name; and when loading data, the comboboxtree can be populated with the existing data?
Appreicate for your help.
-
13 Mar 2008 6:21 AM #7
I need the same - sending the id, not the name and prefilling it with data.
For the first - my dirty solution was hidden field, for the second - i still haven't found solution yet.
-
6 May 2008 12:03 AM #8
Thanks for ux!
But how I can modify .bmp ux files?
Thx.
-
6 May 2008 5:32 AM #9
Go Advanced => Manage attachments
But... Is posible live demo? If you don
-
6 May 2008 11:27 AM #10
galdaka,
And what I must see there?
(If your answer for me.)


Reply With Quote


