I am trying to get a node in a tree view to have a back color that spans all the way across the page. But when i applie the background color it only goes as far as the text. Is there a way to do this? I have also tried to change the size of the node but that seems to make no difference.
5 Answers, 1 is accepted
0
Hi Levi,
I suggest that you do the following:
In the <style> tag of your page, add the following CSS declarations:
.rtHover { background: red !important; }
.rtSelected { background: blue !important; }
Hope this helps.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I suggest that you do the following:
In the <style> tag of your page, add the following CSS declarations:
.rtHover { background: red !important; }
.rtSelected { background: blue !important; }
Hope this helps.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Levi
Top achievements
Rank 1
answered on 07 Apr 2008, 02:38 PM
That works just how i need it too but how do i get it to always be on specific nodes instead of every node when you hover?
0
Hello Levi,
You can use the HoveredCssClass and SelectedCssClass properties of the TreeNodes to apply custom CSS classes only to certain nodes. I attached another sample project to this thread. Please download the files and give them a go.
Hope this helps.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can use the HoveredCssClass and SelectedCssClass properties of the TreeNodes to apply custom CSS classes only to certain nodes. I attached another sample project to this thread. Please download the files and give them a go.
Hope this helps.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Levi
Top achievements
Rank 1
answered on 08 Apr 2008, 03:14 PM
I looked at your attached solution and that works only for hovering or selecting but i need it on specific nodes always. If i use the normal CssClass attribute then it only affects the text instead of the entire node like the hovered and selected css classes do. Any other ideas?
0
Hi Levi,
Unfortunately, this approach will not work for the CssClass property. It will not apply the css style to the proper DIV. You could use some JavaScript to locate the nodes and apply the needed style to them, however, this would not be a good approach.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Unfortunately, this approach will not work for the CssClass property. It will not apply the css style to the proper DIV. You could use some JavaScript to locate the nodes and apply the needed style to them, however, this would not be a good approach.
Regards,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
