This is a migrated thread and some comments may be shown as answers.

Removing plus/minus icon

2 Answers 168 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 14 Oct 2010, 03:16 PM
How do I remove plus/minus icon, when there's no children in the node. 

My tree is populated through a wcf service. And it works like its supposed to. But when I a node, that has no children, I would like to remove the plus/minus icon. 

How to do that in a simple way?

/Daniel

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Oct 2010, 04:58 AM
Hi Daniel,


The forum shows how to hide the expand/collapse image of the root node of tree.
Drop Expand/Collapse Image From Root Node

You can iterate through the nodes (and check for the nodes count) and hide the expand/collapse image using same logic described in forum.

Hope you can achieve the requirement easily.

[Note: In my case, it is not showing expand/collapse image for my simple treeview, if there are no child nodes]


-Shinu.
0
Daniel
Top achievements
Rank 1
answered on 15 Oct 2010, 09:37 AM
That didn't work...

I need an event that gets fired, like populated when there is subnodes. But can't find any...
Tags
TreeView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Share this question
or