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

Custom Style for TreeView Nodes

1 Answer 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Michael Cranford
Top achievements
Rank 1
Michael Cranford asked on 20 Dec 2009, 08:47 PM
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>


</
div></li>



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.

Michael

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Dec 2009, 08:02 AM
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.

CSS:
 
    <style type="text/css"
    .redNode 
    { 
        color: Red !important; 
    } 
    </style> 

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

-Shinu.
Tags
TreeView
Asked by
Michael Cranford
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or