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

[Solved] Custom HoveredCssClass not working?

1 Answer 168 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ming Yang
Top achievements
Rank 1
Ming Yang asked on 07 May 2008, 07:32 PM
Hi, I am using RadTreeView for ASP.NET AJAX. I want to change the HoveredCssClass for the tree nodes which are created using Customerized Template while applying the "Default" skin for the rest tree nodes. What I did is: I created a css class and put it in my main .css file and in my program, I assigned the css to the tree nodes created from template. However, the HoveredCssClass doesn't see to use my stylesheet. So I tried change CssClass and SelectedCssClass as well and fount out the CssClass works, but SelectedCssClass doesn't work either. Can you help here? The following is my code snipet:

node5.NodeTemplate =

new CustomizedTemplates.MyTemplate(dr);
node5.CssClass = "MyNodeCss";
node5.HoveredCssClass = "MyNodeHoveredCss";
node5.SelectedCssClass = "MyNodeSelectedCss";

Thanks.
Ming

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 10 May 2008, 12:01 PM
Hello Ming Yang,

What you need to do is to define your CSS classes in the following way:

<style type="text/css"
.myNodeCss 
    color : red
 
.myNodeHoveredCss .rtIn 
    color : blue !important; 
 
.myNodeSelectedCss .rtIn 
    colorgreen !important; 
</style> 

I hope this helps.

Best wishes,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Ming Yang
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or