PDA

View Full Version : [CLOSED] Treepanel show/hide childnodes



softmachine2011
Aug 28, 2012, 10:48 AM
Hi,

Related to this thread http://forums.ext.net/showthread.php?20127-TreeNode-JS-getUI-method, I must port to Ext.NET 2.1 the following:



myFunction: function (id) {
treePanel.collapseAll();

for (var i = 0; i < treePanel.getRootNode().childNodes.length; i++) {
if (id == 0) {
//Todos los elementos
treePanel.getRootNode().childNodes[i].getUI().show();
}
else {
if (parseInt(treePanel.getRootNode().childNodes[i].id, 10) != parseInt(id, 10))
treePanel.getRootNode().childNodes[i].getUI().hide();
else
treePanel.getRootNode().childNodes[i].getUI().show();
}
}
}


Like we know, getUI method doesn't exists, how can I show/hide childNodes now?

Daniil
Aug 28, 2012, 12:01 PM
Hi,

It is related to the CHANGELOG item #76.
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

Seems we have the functionality in Ext.NET for filtering which allows to hide a node this way:

node.set("hidden", true);
and show

node.set("hidden", false);

softmachine2011
Aug 28, 2012, 12:12 PM
Oh yes, sorry for the inconvenience

Thanks!