PDA

View Full Version : [CLOSED] Tree node not added



jesperhp
Jan 29, 2014, 3:02 PM
Hi
the way I add node by using extjs of ext.net v1.1 but now its not working in extjs 4.x of ext.net 2.x

Basically I manually add a treenode just like below and that was added in ext.net v1.1, so how could that added in v2.x



_node: new Ext.tree.TreeNode({ text: 'KnowledgeBase', id: '1', leaf: true }),




Thanks

Daniil
Jan 30, 2014, 4:07 AM
Hi @jesperhp,

You can use the appendChild method.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.NodeInterface-method-appendChild

Example

destinationNode.appendChild({
text: 'KnowledgeBase',
id: '1',
leaf: true
});

jesperhp
Jan 30, 2014, 5:56 AM
Hi @jesperhp,

You can use the appendChild method.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.NodeInterface-method-appendChild

Example

destinationNode.appendChild({
text: 'KnowledgeBase',
id: '1',
leaf: true
});

Thanks
Mark it close