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

Style Only First Level Nodes

2 Answers 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bre
Top achievements
Rank 1
Bre asked on 21 Jun 2013, 04:43 PM

How can I use the CSS Skin File to style only the first level nodes of the TreeView?  I have tried styling rtTop and rtFirst, but those only style the first node of each level of the first branch or the very first node of the whole tree.  In addition, how can I have the lines show only on the lower level nodes and NOT for the first level?

I've attached two images to illustrate my request.  The first is the TreeView as it appears by default and the second is how I would like the TreeView to be styled (first level nodes that have a background style and no lines connecting them).

Any help with this would be greatly appreciated.

Thank you!

2 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 26 Jun 2013, 11:40 AM
Hi Bre,

Please try to use the following css:
<style type="text/css">
     .rtLines,
     .rtLines > li,
     .rtLines > li > div,
     .rtLines > li > ul {
         background: none !important;
     }
     .rtLines > li > div > span.rtIn {
         background-color:blue;
     }
 </style>

It should style the root nodes and remove the connecting lines.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Bre
Top achievements
Rank 1
answered on 26 Jun 2013, 03:21 PM
Hristo,

This is exactly what I needed! Thank you so much!

- Bre
Tags
TreeView
Asked by
Bre
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Bre
Top achievements
Rank 1
Share this question
or