PDA

View Full Version : Add combo box to treenode



maylwy
4 Feb 2014, 5:21 PM
Hi,

I have a treepanel which generates a tree from a treestore with a json string. May I know is there a way to add a combo box to a tree node?

Thanks!

slemmon
6 Feb 2014, 11:38 AM
The treepanel doesn't itself (or more specifically the column classes) don't support components within the cells, but you can set an editor using the cell editing plugin.

The "Light" column has been set up with a combo editor field in this example:
http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#cell-editing

The tree would be set up similarly using a columns config and the cell editor plugin.
http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#tree-grid