Home - Forums-.NET - FlyTreeView (ASP.NET) - Hide/Show TreeNode on client side

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Hide/Show TreeNode on client side
Link Posted: 05-Jul-2007 09:07
Hello

Nice controll.

Can not figure out 2 things:

1. How to hide/show node on client side. Something like setVisible(bool) for each node on client side.

2. I need to track double clicks on TreeNodes on client, but seems with events supported on client it is not possible. onSelectedNodeChangedHandler fired only once. Is it possble to have something like onNodeClick even that will be fired every time when mouse button is clicked on node text

Thanks
Link Posted: 05-Jul-2007 18:30
[quote="savtol"]
1. How to hide/show node on client side. Something like setVisible(bool) for each node on client side.

You can use node.expand() or node.collapse() to show/hide child nodes.


[quote="savtol"]
2. I need to track double clicks on TreeNodes on client, but seems with events supported on client it is not possible. onSelectedNodeChangedHandler fired only once. Is it possble to have something like onNodeClick even that will be fired every time when mouse button is clicked on node text

You can use TreeNode.NavigateUrl property to create a Javascript handler for click.

So you'll need to set something like this

node.NavigateUrl = "javascript:yourNodeClickHandler()"
Link Posted: 06-Jul-2007 00:50
Thanks for response.

I need to do some filtering on client side (hide some nodes), as result expand/collapse will not help.
Link Posted: 06-Jul-2007 02:39
So you can use

document.getElementById(node.getID())

to get element, and manage its visibility with CSS.

But I'm not sure why you need this.