PDA

View Full Version : Custom Content in Ext.tree.Panel Nodes



jcarcamo
8 Apr 2013, 1:17 PM
Hi,

How could I make tree nodes display custom content instead of just the text node. Specifically, I want to replace the text in a node with a combo box whenever the user clicks on a node.

Thanks,
Jose

slemmon
10 Apr 2013, 6:40 AM
You should be able to use the cellEditing (http://docs.sencha.com/ext-js/4-2/#!/api/Ext.grid.plugin.CellEditing) plugin with your tree. You'll just need to configure the tree with a columns config.

See this example for how to set up a tree with a columns config:
http://docs.sencha.com/ext-js/4-2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#tree-grid

And this example for how to configure an editor on a column (this is where you'll configure your combobox):
http://docs.sencha.com/ext-js/4-2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#cell-editing