Style Only First Level Nodes

3 posts, 1 answers
  1. Bre
    Bre avatar
    4 posts
    Member since:
    Jan 2011

    Posted 21 Jun 2013 Link to this post

    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. Answer
    Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 26 Jun 2013 Link to this post

    Hi Bre,

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

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

    Hristo Valyavicharski
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bre
    Bre avatar
    4 posts
    Member since:
    Jan 2011

    Posted 26 Jun 2013 Link to this post


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

    - Bre
Back to Top