PDA

View Full Version : tree nodes removal



olavevismaya
14 Nov 2010, 8:57 PM
hi... how to remove the particular tree nodes..i'am using like this
node.removeChild(node.firstChild);
it will remove first node..i want remove specific nodes....
anyone knows solution help me.....

Condor
21 Nov 2010, 11:26 PM
var node = tree.getNodeById(nodeId);
if (node) {
node.remove(true);
}

olavevismaya
22 Nov 2010, 12:55 AM
thank you condor it works perfectly....
it is possible to get all the node_id's to one array...from json file.....

Condor
22 Nov 2010, 1:04 AM
Please explain...

olavevismaya
22 Nov 2010, 1:09 AM
In my json file 4 nodes are there,those nodes id's i need into one array,for comparing with some of ds values...

Condor
22 Nov 2010, 1:12 AM
Do an Ext.Ajax.request for the json file. Decode the responseText in the success handler and do something with the result.

olavevismaya
22 Nov 2010, 1:15 AM
ok thank you condor....