We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeView Hidden Nodes

When I hide nodes in a TreeView, there is an empty space/section when the node was previously visible.

Is there a way to make the nodes on top and below of the hidden node collapse to fill the empty space?

(Attached is an image of a hidden node in a tree)

Attachment: HiddenNode_c8300875.zip

3 Replies

KM Kanagambigai Murugan Syncfusion Team October 18, 2019 05:53 AM UTC

Hi Steve, 

Greetings from Syncfusion. 

We have checked the reported issue and the attached screenshot. We suspect that you are hiding the nodes by setting Visibility as hidden. Instead of that, please set the display as none to overcome the reported issue. We have prepared a sample for your reference.  

Please check the above sample and get back to us if you need any further assistance on this. 

Kanagambigai M. 

SM Steve Mumma October 18, 2019 01:27 PM UTC

I'm trying to hide or show nodes based on an outside action (ie not from any treeview event like nodeSelected or nodeCheck). 
I was using the hideNode() and showNode() methods. Using these two methods, the node hides or shows properly and the child nodes (if any) hide and show properly but there is an empty section for the hidden nodes.
There does not seem to be any property for style or display when I retrieve a node from the treeview using getNode().

I believe I am using EJ1 instead of EJ2 as well if that makes a difference.

(See attached image).

Attachment: HiddenNode2_4616740d.zip

KR Keerthana Rajendran Syncfusion Team October 21, 2019 10:30 AM UTC

Hi Steve, 
Good day to you. 
We have checked your reported problem and attached screenshot at our end. “hideNode” method of our EJ1 Treeview component works fine at our end and no empty section is added for hidden nodes. Could you please check the below sample? 
Note: Our TreeView component getNode() method returns the corresponding node details and not the node element. 
Could you please check the sample and if the issue persists, modify the above sample to replicate the issue(if possible) along with the product version in which you get this issue to proceed further.  

Live Chat Icon For mobile
Up arrow icon