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

Hide the Collapse/Expand button

8 Answers 495 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
VANDENBERGHE
Top achievements
Rank 1
VANDENBERGHE asked on 04 Jun 2008, 07:49 AM
Hi everyone,

Is it possible to hide the Collapse/Expand  button in a RadTree. Is there for example a set_expandable() javascript function ???

Regards,
Sebastien.

8 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 04 Jun 2008, 01:14 PM
Hello VANDENBERGHE,

You can hide the Plus/Minus images by applying the following CSS style to your page:

        div.RadTreeView .rtMinus, 
        div.RadTreeView .rtPlus 
        { 
            displaynone
        } 

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
VANDENBERGHE
Top achievements
Rank 1
answered on 04 Jun 2008, 01:20 PM
Thanks,

But my problem is I just want to hide the collapse/expand sign for one node and not for all the nodes in the tree. Is there anyway to do that ?

Regards,
Sebastien.
0
Accepted
Atanas Korchev
Telerik team
answered on 04 Jun 2008, 03:46 PM
Hello VANDENBERGHE,

You can use some JavaScript to implement the same. Here is a sample code:

var treeView = $find("<%=RadTreeView1.ClientID%>");
var node = treeView.get_nodes().getNode(0);
var toggleElement = node.get_toggleElement();
if (toggleElement)
toggleElement.style.display = "none";


Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
VANDENBERGHE
Top achievements
Rank 1
answered on 04 Jun 2008, 03:51 PM
Thanks a lot, I haven't seen this function in the doocumentation, sorry.

Regards,
Sebastien.
0
Datamex
Top achievements
Rank 2
answered on 22 Jan 2010, 11:26 AM
Hi,

I do want to hide all Plus/Minus images of the treeview.
Can you tell me how to remove the whitespace before the nodes?
0
Princy
Top achievements
Rank 2
answered on 22 Jan 2010, 01:23 PM
Hello,

I am using same CSS as Simon suggested, for hiding the plus/minus signs of treeview. And if you want to hide the lines, then you can set the 'ShowLineImages' property of RadTreeView to "false".

Thanks,
Princy.
0
Datamex
Top achievements
Rank 2
answered on 22 Jan 2010, 01:31 PM
Hi Princy,

I already did that, but there is still about one cm of whitespace before the treeview.
See my image attachment.
0
Krishna
Top achievements
Rank 1
answered on 26 Sep 2014, 05:01 AM
Display :none doesn't works
Tags
TreeView
Asked by
VANDENBERGHE
Top achievements
Rank 1
Answers by
Simon
Telerik team
VANDENBERGHE
Top achievements
Rank 1
Atanas Korchev
Telerik team
Datamex
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Krishna
Top achievements
Rank 1
Share this question
or