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
close icon

Deactivate the PlusMinus in a Subnode of the Treeview

Hi all, we are using your TreeView and want to have PlusMinus icons to opened/closed parent nodes. If nodes are empty (no child node) then there should be no plus (and no minus) - if there are children there must be the plus. Now we set in the cildnodes if they have no more childs node.NodeData.ShowPlusMinus=false This setting does nothing dor this node. The Plus appears here too ? How can we prevent the plus in any node that has no more childnodes? Thank you very much Ralf

7 Replies

AS Arun Srinivasan Syncfusion Team November 14, 2003 08:35 PM UTC

Hi Ralf, 1. Which version of Essential Tools are you using? 2. Can you post a sample or code snippet? You should call ShowPlusMinus = false; after Nodes.Add() You need to create/add the nodes before setting it's properties. Regards, Arun


PA Patrick January 29, 2004 04:14 PM UTC

I am having a similar problem. I am looking at the TreeViewAdv LoadOnDemand sample project. At the leave node, there is a plus sign. How do I prevent the leave node displaying the plus sign?


AD Administrator Syncfusion Team January 29, 2004 05:22 PM UTC

Hi Patrick Which version of Essential Tools are you using? Can you send an email to salessupport@syncfusion.com to obtain the latest beta version as there have been a lot of changes made to the TreeViewAdv control in the 2.0 version. Regards Arun


PA Patrick January 29, 2004 05:33 PM UTC

I am using 2.0.2.0 beta version of the tree view.


AD Administrator Syncfusion Team January 31, 2004 10:28 PM UTC

Hi Patrick The behaviour you encounter in the LoadOnDemand is by design as when the LoadOnDemand property is set to True. All the nodes will have the plus-minus set to visible. You should handle the BeforeExpand event of the nodes and add subnodes to the respective nodes. The tree will then show or hide the plus-minus based on whether or not children were added. You can see this behavviour in the sample. Regards Arun


AD Administrator Syncfusion Team February 2, 2004 11:32 AM UTC

Arun, I understand the design of the loadondemand, but is there any way to not show the plus sign if there isn''t any child for a given node? Can the tree query for each immediate sub node(s) after/before expand, to find out if a plus sign is required? Can this be added to the tree? If not, is there a workaround for not showing the plus sign for nodes without any child?


AD Administrator Syncfusion Team February 2, 2004 11:54 AM UTC

I answered my own question. Thanks.

Loader.
Live Chat Icon For mobile
Up arrow icon