Dec 14, 2010, 9:09 AM
[CLOSED] Problem when adding a Tree Node from Javascript
Dear Team:
I have the following code.
I have the following code.
Javascript to Add New Node:
addGroup: function(destination) {
var destSelectedNode = destination.getSelectionModel().getSelectedNode();
var newNode = { id: '999999', text: "Group Header" };
if (destSelectedNode != null) {
destination.getRootNode().appendChild(newNode);
}
else {
destination.getRootNode().appendChild(newNode);
}
}
<ext:TreePanel ID="treePanelDestination" runat="server" RootVisible="false" Title="Customized Fields"
UseArrows="true" AutoScroll="true" Animate="true" EnableDD="true" Mode="Local"
AllowLeafDrop="true" ContainerScroll="true">
</ext:TreePanel>
<ext:Button ID="Button5" runat="server" Text="G +" StyleSpec="margin-bottom:2px;">
<Listeners>
<Click Handler="X.addGroup(treePanelDestination);" />
</Listeners>
</ext:Button>
when i click on the button i need to add a node, the node is getting added, but the problem is, i am not able to expand the node it shows loading icon, and also i was not able to add child node for the created node(i have separate code to add child node). I am not able to select the node also. pls look into the attached image and help me on this
Last edited by Daniil; Dec 15, 2010 at 9:49 AM.
Reason: [CLOSED]