Custom Style for TreeView Nodes

2 posts, 0 answers
  1. Michael Cranford
    Michael Cranford avatar
    10 posts
    Member since:
    Nov 2004

    Posted 20 Dec 2009 Link to this post

    I have clickable nodes in my treeview. I am adding a custom class to them, but I cannot get this to show up. I have tried a wide variety of settings in CSS. The class I am adding is called rednode. Here is what the node looks like in the page source:

    <li class="rtLI"><div class="rtMid">

    span class="rtSp"></span><input type="checkbox" class="rtChk" /><img src="images/page_white_text.png" alt="" class="rtImg" /><a class="rtIn rednode" href="javascript:setValue('10003')">Great Deals</a>


    Could you please tell me what to do in my style sheet so that this node is colored red?? The sample on your site does not use a linked node.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Dec 2009 Link to this post

    Hi Michael,

    I guess you are setting the CssClass for each node and the style is not applying properly. If so try adding !important modifier and see whether it is working fine.

        <style type="text/css"
            color: Red !important; 

    <telerik:RadTreeNode runat="server"  NavigateUrl="Redirect.aspx" CssClass="redNode"  Text="CPU"
     . . . 

Back to Top