-
12 Mar 2012 1:27 AM #1
multi-level combobox possible??
multi-level combobox possible??
Im trying to have a combobox in my viewport which contains, say 2/3 level list. I can select the leaf entry and on select I execute my logic. How can I get a combobox like that?
-
12 Mar 2012 2:07 AM #2
It's certainly possible but I think it'll need a little work.
One way would be to use a custom template on the boundlist. Specify an override to getInnerTpl in the listConfig.
Another alternative is the TreeCombo approach. It isn't really a combobox but it's similar. Here's a starting point if you want to go down that route.
Code:Ext.create('Ext.form.field.Picker', { renderTo: Ext.getBody(), createPicker: function() { return Ext.create('Ext.tree.Panel', { hidden: true, floating: true, minHeight: 300, root: { expanded: true, text: 'Root', children: [ {text: 'Child 1', children: []}, {text: 'Child 2', children: []}, {text: 'Child 3', children: []} ] } }); } });
-
12 Mar 2012 3:31 AM #3
Hi,
I tried the tree approach earlier but I need something like this -
combobox.PNG
This is what Im searching for. I couldnt find anything, is this possible?? How can I do that??
-
12 Mar 2012 3:42 AM #4
For that style of UI I'd try using a menu bound to a picker. Similar to the TreeCombo approach but using an Ext.menu.Menu. Menus have built in support for sub-menus, which look just like the picture you posted.
-
12 Mar 2012 6:21 AM #5
While checking out, I came across 'Ext.ux.grid.menu.ListMenu' . Can I use this for my multi-level menu?? Didnt get to see an example of this. Where can Iget a sample of this?


Reply With Quote