This is a migrated thread and some comments may be shown as answers.
Prevent Nodes From Being Collapsable
7 Answers 42 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin Watkins
Top achievements
Rank 1
Kevin Watkins asked on 08 Apr 2010, 05:09 PM
Hi,

Bit of a weird request but if it's easy for you to add in that would be great...

I my tree I want certain nodes permanently expanded. So I'd like some sort of Collapsable = false property. When set the little plus/minus icon wouldn't be rendered and the node would stay permanently expanded.

Cheers,

Kev

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Apr 2010, 08:56 AM
Hi Kevin Watkins,

You can just hide the plus and minus icons with the following CSS:

<style type="text/css">
    .t-treeview .t-plus,
    .t-treeview .t-minus
    {
        display:none;
    }
   </style>

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kevin Watkins
Top achievements
Rank 1
answered on 09 Apr 2010, 11:15 AM
Afraid that won't work because I only want some of the nodes to be permanently expanded. I need the first two levels to be expandible and collapsible, but the third level permanently expanded.

On a related note is there a way to turn off selection? I'm currently doing it by overriding the t-state-selected CSS class but that's not ideal, I'd prefer to flat out turn off the functionality.

Cheers,

Kev
0
Accepted
Atanas Korchev
Telerik team
answered on 09 Apr 2010, 11:19 AM
Hello Kevin Watkins,

Well you can customize the CSS to apply to the required level and below:

    .t-treeview .t-item .t-item .t-plus,
    .t-treeview .t-item .t-item .t-minus
    {
        display:none;
    }

It is not possible to turn off selection without modifying the source code.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kevin Watkins
Top achievements
Rank 1
answered on 09 Apr 2010, 11:24 AM
Of course that won't work either because I could then collapse a node by double clicking on the text...

Do you have somewhere I can submit feature requests for this? I'll probably code it myself anyways - can I submit that code to you guys for inclusion in the next version?

Cheers,

Kev
0
Atanas Korchev
Telerik team
answered on 09 Apr 2010, 11:27 AM
Hi Kevin Watkins,

Have you tested it? Double clicking relies on that image in order to work.

You can send us the code but including it as a built-in feature would require careful review of the team. We try to keep things as simple as possible and will implement features only when there is high demand for them.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kevin Watkins
Top achievements
Rank 1
answered on 09 Apr 2010, 11:34 AM
You're right it does work, sorry. Made a mistake with my CSS the first time around so I didn't think it worked. Sorry!

Cheers,

Kev
0
Jero
Top achievements
Rank 1
answered on 15 May 2012, 10:46 AM
After apply the corresponding CSS, actually I can collapse with double click on the node text, what am I a doing wrong???
Tags
TreeView
Asked by
Kevin Watkins
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Kevin Watkins
Top achievements
Rank 1
Jero
Top achievements
Rank 1
Share this question
or