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

How to not show the Plus/Minus if the node has no children.

I'm building an application which uses a TreeViewAdv control, but not all nodes are expanded at the beginning.   I'm using LoadOnDemand.   Everything works OK except that the node has no children, it still displays the Plus sign.   Now the Plus sign goes away when clicked, but how to I get to not show up at all.

3 Replies

PA Paul Anderson S Syncfusion Team January 28, 2013 09:33 AM UTC

Hi Henry,

Thanks for your interest in Syncfusion products.

In TreeViewAdv by setting LoadOnDemand property to true, the plus and minus of all the nodes will be visible in the beginning. Now on selecting a node the BeforeExpand event of the nodes and subnodes are triggered and the TreeNode will display or hide the plus or minus based on whether or not the children are added. This is a normal behavior of TreeViewAdv control.

Please have the documentation from the below link.

[Documentation link]
http://help.syncfusion.com/ug/windows%20forms/tools/default.htm#!documents/31137loadondemand.htm

Please let us know if you have any concerns.

Regards,
Paul Anderson S


HD Henry Drews January 31, 2013 03:40 AM UTC

I think I understand.   Because I'm loading on demand the plus has to be shown otherwise there would be no way to expand that node to get any children.   It is only afterwards that you know if there are children or not.   Thanks.



PA Paul Anderson S Syncfusion Team January 31, 2013 08:54 AM UTC

Hi Henry ,

Thanks for the update.

We are glad to help you on this.

Please let us know if you need any other details.

Regards ,
Paul Anderson S

Loader.
Live Chat Icon For mobile
Up arrow icon