View Full Version : [OPEN] [#207] How to add a node with children

Apr 13, 2013, 5:30 AM
This worked in 1.x. I want to add a node with children to a tree. The new node contains 1 child but when added, it shows two children with the same id. What am I doing wrong?

<script type="text/javascript">
function addStuff() {
id: 'item1',
text: 'item1',
expanded: true,
children: [{
id: 'item1A',
text: 'item1A',
children: [],
leaf: true
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" ScriptMode="Debug" Theme="Gray"
DisableViewState="true" Namespace="" />
<ext:TreePanel ID="TreePanel1" runat="server" Width="300" Height="450" Icon="BookOpen"
Title="Catalog" AutoScroll="true">
<ext:Toolbar runat="server">
<ext:Button runat="server" Text="Add Stuff" Handler="addStuff();">
<ext:Node Text="Composers" Expanded="true">
<ext:Node Text="Beethoven" Icon="UserGray">
<ext:Node Text="Concertos">
<ext:Node Text="No. 1 - C" Icon="Music" Leaf="true" />
<ext:Node Text="No. 2 - B-Flat Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 3 - C Minor" Icon="Music" Leaf="true" />

Apr 13, 2013, 5:40 AM
A ExtJS 4.2 bug.


Apr 15, 2013, 5:09 AM
Hi @jchau,

Seems, @JTRipper suggests something in the "Possible fix" section. Have you tried it?

Apr 15, 2013, 2:24 PM
Yes, the possible fix worked

Apr 15, 2013, 4:20 PM
Thank you for confirming.

We decided to commit that change as a temp fix. Though, still need to monitor the Sencha thread and wait their fix.

Created an Issue to monitor.